Please someone here that administer this project can open a free account for opensource projects on http://scan.coverity.com/ and submit tinycc build to verify for defects, I did with my account and I've got this:
There is much more details available about this problems on the account pages, if someone want to see then tell me and I can add a new user to see then on my account. CID Type Impact Status First Detected Owner Classification Severity Action Component Category File Function 968207 Uninitialized scalar variable High New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Uninitialized variables /tccgen.c vpush64 968206 Uninitialized scalar variable High New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Uninitialized variables /tccgen.c unary 968205 Uninitialized pointer read High New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Memory - illegal accesses /tccgen.c struct_decl 968204 Uninitialized scalar variable High New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Uninitialized variables /tccgen.c gv 968203 Uninitialized scalar variable High New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Uninitialized variables /tccgen.c gfunc_param_typed 968202 Uninitialized scalar variable High New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Uninitialized variables /tccgen.c gen_op 968201 Uninitialized scalar variable High New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Uninitialized variables /tccgen.c expr_cond 968200 Uninitialized scalar variable High New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Uninitialized variables /tccgen.c expr_cond 968199 Untrusted loop bound Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Insecure data handling /win32/tools/tiny_libmaker.c main 968198 Untrusted loop bound Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Insecure data handling /win32/tools/tiny_impdef.c get_export_names 968197 Untrusted array index read Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Insecure data handling /tccpp.c next_nomacro1 968196 Various Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Insecure data handling /tccpe.c pe_load_res 968195 Various Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Insecure data handling /tccelf.c tcc_load_object_file 968194 Various Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Insecure data handling /tccelf.c tcc_load_dll 968193 Untrusted loop bound Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Insecure data handling /tccelf.c tcc_load_alacarte 968192 Destination buffer too small High New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Memory - corruptions /tccpe.c pe_write 968191 Copy into fixed size buffer Low New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Security best practices violations /tccpe.c pe_load_def 968190 Copy into fixed size buffer Low New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Security best practices violations /tccpe.c pe_find_import 968189 Copy into fixed size buffer Low New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Security best practices violations /tccpe.c pe_assign_addresses 968188 Copy into fixed size buffer Low New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Security best practices violations /tccgen.c gen_inline_functions 968187 Copy into fixed size buffer Low New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Security best practices violations /tccelf.c ld_add_file_list 968186 Copy into fixed size buffer Low New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Security best practices violations /libtcc.c put_extern_sym2 968185 String not null terminated High New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Memory - illegal accesses /win32/tools/tiny_libmaker.c main 968184 String not null terminated High New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Memory - illegal accesses /tccelf.c tcc_load_alacarte 968183 Insecure temporary file Low New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Security best practices violations /win32/tools/tiny_libmaker.c main 968182 Dereference before null check Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Null pointer dereferences /win32/tools/tiny_libmaker.c main 968181 Pointer to local outside scope High New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Memory - illegal accesses /libtcc.c put_extern_sym2 968180 Resource leak High New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Resource leaks /libtcc.c tcc_add_file_internal 968179 Out-of-bounds read High New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Memory - illegal accesses /tccpp.c tok_str_add2 968178 Out-of-bounds write High New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Memory - corruptions /tccgen.c gv 968177 Out-of-bounds read High New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Memory - illegal accesses /tccgen.c gv 968176 Out-of-bounds access High New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Memory - corruptions /tccgen.c gv 968175 Out-of-bounds read High New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Memory - illegal accesses /tccgen.c get_reg 968174 Nesting level does not match indentation Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Control flow issues /tccgen.c expr_cond 968173 Argument cannot be negative Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Error handling issues /win32/tools/tiny_libmaker.c main 968172 Argument cannot be negative Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Error handling issues /tccpe.c pe_load_file 968171 Improper use of negative value Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Integer handling issues /tccpe.c pe_fpad 968170 Improper use of negative value Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Integer handling issues /tccgen.c vstore 968169 Improper use of negative value Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Integer handling issues /tccgen.c gv_dup 968168 Improper use of negative value Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Integer handling issues /tccgen.c gv 968167 Improper use of negative value Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Integer handling issues /tccgen.c expr_cond 968166 Improper use of negative value Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Integer handling issues /i386-gen.c gen_opf 968165 Missing break in switch Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Control flow issues /tccpp.c get_tok_str 968164 Missing break in switch Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Control flow issues /tccpp.c get_tok_str 968163 Missing break in switch Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Control flow issues /tccpe.c pe_load_def 968162 Missing break in switch Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Control flow issues /tccgen.c init_putv 968161 Explicit null dereferenced Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Null pointer dereferences /win32/tools/tiny_libmaker.c main 968160 Dereference after null check Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Null pointer dereferences /tccelf.c put_elf_sym 968159 Explicit null dereferenced Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Null pointer dereferences /tcc.c parse_args 968158 Dereference after null check Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Null pointer dereferences /lib/bcheck.c __bound_new_page 968157 Division or modulo by zero Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Integer handling issues /lib/libtcc1.c __udivmoddi4 968156 Dead default in switch Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Control flow issues /tccasm.c asm_expr_prod 968155 Dead default in switch Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Control flow issues /tccasm.c asm_expr_logic 968154 Unchecked return value from library Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Error handling issues /win32/tools/tiny_libmaker.c main 968153 Unchecked return value from library Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Error handling issues /win32/tools/tiny_libmaker.c main 968152 Unchecked return value from library Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Error handling issues /tccpe.c read_mem 968151 Unchecked return value from library Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Error handling issues /tccpe.c pe_write 968150 Unchecked return value Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Error handling issues /tccgen.c struct_decl 968149 Unchecked return value from library Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Error handling issues /tccelf.c tcc_load_object_file 968148 Unchecked return value from library Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Error handling issues /tccelf.c tcc_load_archive 968147 Unchecked return value from library Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Error handling issues /tccelf.c tcc_load_alacarte 968146 Unchecked return value from library Medium New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Error handling issues /tccelf.c load_data 968145 Out-of-bounds access High New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Memory - corruptions /lib/bcheck.c __bound_init 739577 Resource leak High New 1/17/2013 Unassigned Unclassified Unspecified Undecided Other Resource leaks /tcc.c parse_args On Thu, Jan 17, 2013 at 1:24 PM, Thomas Preud'homme <robo...@celest.fr>wrote: > Le jeudi 17 janvier 2013 01:48:01, Michael Matz a écrit : > > Hi, > > > > > > Pointer to integer conversions (and back) are implementation defined, the > > only requirement being that if the integer type is (u)intptr_t that a > > pointer converted to that one and back to a pointer shall compare equal > to > > the original pointer. > > > > So, depending on how the compiler implements this conversion (and > > > > documents this) one might get different results: > > > $ gcc -o long_long long_long.c && ./long_long > > > [SNIP gcc warnings] > > > -66 -66 -66 -66 -66 -66 > > > > This is a correct result for ILP32 (i.e. 32bit code). GCC sign extends > > pointers when the pointer representation needs fewer bits than the target > > type. > > > > > $ clang -o long_long long_long.c && ./long_long > > > -66 -66 -66 -66 4294967230 4294967230 > > > > And this is also a correct result for 32bit code, when the compiler > > defines pointer to integer conversion to be zero-extending when the > target > > type has more bits than a pointer. IMO sign-extending is more useful, > and > > as GCC set the precedent a long time ago I would declare clang to at > least > > have an QoI issue with compatibility with GCC. In other words: tcc has > no > > bug here. > > Thanks a lot for your explaination Michael. There is also the p -= > 0x700000000042; assignment which is compiler-specific for C11 (not sure for > C99) I think because nothing in the standard say there should be overflow. > The > compiler can do crazy things with it, as explained in > http://lwn.net/Articles/511259/. > > Ok so no bug on tcc here, good :) > > > > > > > Ciao, > > Michael. > > Best regards, > > Thomas > > _______________________________________________ > Tinycc-devel mailing list > Tinycc-devel@nongnu.org > https://lists.nongnu.org/mailman/listinfo/tinycc-devel > >
_______________________________________________ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel