[Tinycc-devel] Local string behaviour with bound check enabled
Hi all, Sorry to write so many mails in the list, but I don't see other methods of contacting the dev team :) I noticed the discrepancy in the compiler behaviour regarding local strings. Consider this example void TestFunc() { char str1[] = "mystring"; char *str2 = "myotherstring";} There is no meaningful difference between declaring the local string one way or another, yet the bound check code will generate the bound record in the first case, and not generate it in the second (see add_local_bounds function). BW, George ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
[Tinycc-devel] Possible bug in memalign
Hi all, I noticed that in all the calls and definitions of memalign in bcheck.c the signature looks like this: memalign(size_t size, size_t align), while the definition of the standard memalign is in reverse: memalign(size_t alignment, size_t size) (see https://linux.die.net/man/3/memalign). Was it done on purpose or is it an error? BW, George ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
[Tinycc-devel] A couple of questions
Hi all, First of all, I noticed that throughout the codebase there is a mix of spaces and tabs. This makes it very difficult to produce out-of-tree patches, since most of the editors will replace tabs with spaces. Is there a reason behind it? The second question is about the bounds check. In the current implementation it is common to first access the provided pointer, and only after that check if it is valid or not (e.g. the __bound_str* functions). Doesn't it defy the whole purpose of the functions? What is the intended usecase of this feature? BW, George ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel