cii
cii copied to clipboard
C Interfaces and Implementations
This is just a small issue. When I used the "-fsanitize=undefined" option to clang, it complained that performing arithmetic on a NULL pointer is undefined behaviour at [L49 of text.c](https://github.com/drh/cii/blob/master/src/text.c#L49)....
Should free the two tables and the set.
``` AP_T x = AP_new(LONG_MIN); long val = AP_toint(x); // The val is 0 ``` `AP_toint` turn `LONG_MIN` to `0` . https://github.com/drh/cii/blob/master/src/ap.c#L323 can use without `%`. ``` unsigned long u...
https://github.com/drh/cii/blob/master/src/xp.c#L192 should change to `if (n >= m + s/8)` For example `{0xFF, 0xFF}` shift left `XP_lshift(3, z, 2, x, 20, 0)` should be `{0, 0, 0}` , but is...
https://github.com/drh/cii/blob/master/src/ap.c#L361 Before `AP_new(0)` , call `AP_free(&z)` making code stricting, Does it ? ` if (endp == p) { endp = (char *)str; z = AP_new(0); } `
``` What steps will reproduce the problem? In CII's chapter 9, Set_union(s,NULL) clones a set, but the cloned set's size is smaller. Here is test code: Set_T s,t; s =...
I do not want to post my issue without first discussing it by email with Dr. Hanson.
``` 1, Optional return statement. 2, NDEBUG defined or not. ``` Original issue reported on code.google.com by `[email protected]` on 15 Oct 2012 at 9:51 Attachments: - [cii-build-issue.zip](https://storage.googleapis.com/google-code-attachments/cii/issue-10/comment-0/cii-build-issue.zip)
``` In Ch20, 20.2.1, Sorting concurrently, partition's implementation might access the invalid memory. 1 int partition(int a[], int i, int j) { 2 int v, k, t; 3 j++; 4...
``` I'm trying to use the memchk.c library to check some of my code, but I was getting an assertion error on FREE'ing because this test was failing: ((unsigned long)ptr)...