[Bug sanitizer/109330] New: ASAN since GCC-9 missed a stack-use-after-scope at -O3

2023-03-29 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109330 Bug ID: 109330 Summary: ASAN since GCC-9 missed a stack-use-after-scope at -O3 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3

[Bug sanitizer/109313] New: Incorrect line number in Use-After-Scope report

2023-03-28 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109313 Bug ID: 109313 Summary: Incorrect line number in Use-After-Scope report Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug sanitizer/109151] New: UBsan misses a divide-by-zero

2023-03-15 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109151 Bug ID: 109151 Summary: UBsan misses a divide-by-zero Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer

[Bug sanitizer/109107] New: UBsan since GCC-8 misses an integer-overflow

2023-03-12 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109107 Bug ID: 109107 Summary: UBsan since GCC-8 misses an integer-overflow Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug sanitizer/109050] New: UBsan failed to detect out-of-bound at -O0/1/2/s

2023-03-07 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109050 Bug ID: 109050 Summary: UBsan failed to detect out-of-bound at -O0/1/2/s Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3

[Bug sanitizer/108963] New: ASAN produces wrong line number in the report

2023-02-28 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108963 Bug ID: 108963 Summary: ASAN produces wrong line number in the report Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug sanitizer/108904] New: ASAN at -O2/3 missed a global buffer overflow

2023-02-23 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108904 Bug ID: 108904 Summary: ASAN at -O2/3 missed a global buffer overflow Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug sanitizer/108903] New: ASAN may miss a global-buffer-overflow

2023-02-23 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108903 Bug ID: 108903 Summary: ASAN may miss a global-buffer-overflow Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug sanitizer/108864] New: Insufficient red zone in ASAN

2023-02-20 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108864 Bug ID: 108864 Summary: Insufficient red zone in ASAN Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer

[Bug sanitizer/108824] ASAN -O2/3 missed a stack-buffer-underflow since GCC-10

2023-02-16 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108824 Li Shaohua changed: What|Removed |Added Resolution|--- |INVALID Status|UNCONFIRMED

[Bug sanitizer/108824] New: ASAN -O2/3 missed a stack-buffer-underflow since GCC-10

2023-02-16 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108824 Bug ID: 108824 Summary: ASAN -O2/3 missed a stack-buffer-underflow since GCC-10 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal

[Bug sanitizer/108817] New: ASAN at -O3 failed to detect a global-buffer-overflow

2023-02-16 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108817 Bug ID: 108817 Summary: ASAN at -O3 failed to detect a global-buffer-overflow Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3

[Bug sanitizer/108637] ASAN at -O2 misses a stack-use-after-scope

2023-02-02 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108637 Li Shaohua changed: What|Removed |Added Resolution|INVALID |--- Status|RESOLVED

[Bug sanitizer/108637] ASAN at -O2 misses a stack-use-after-scope

2023-02-02 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108637 --- Comment #2 from Li Shaohua --- (In reply to Andrew Pinski from comment #1) > PRE removes the load/stores from/to *f . > Basically the compiler is able to remove the use-after-scope usage with -O2 > and above. Well, this makes sense to me

[Bug sanitizer/108637] New: ASAN at -O2 misses a stack-use-after-scope

2023-02-02 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108637 Bug ID: 108637 Summary: ASAN at -O2 misses a stack-use-after-scope Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug sanitizer/108628] New: ASAN at -O3 misses a stack-use-after-return

2023-02-01 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108628 Bug ID: 108628 Summary: ASAN at -O3 misses a stack-use-after-return Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug sanitizer/108481] [13 Regression] UBsan missed a signed integer overflow

2023-01-31 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108481 --- Comment #4 from Li Shaohua --- (In reply to Andrew Pinski from comment #2) > i = i - 6822162149299574294; > > Is not being invoked on the executable code. > > If we look at look at the original code: > > > if ((i * (unsigned

[Bug sanitizer/108541] New: ASAN since GCC 9 missed a stack-buffer-overflow

2023-01-25 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108541 Bug ID: 108541 Summary: ASAN since GCC 9 missed a stack-buffer-overflow Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug sanitizer/108510] ASAN missed a stack-use-after-scope at -O1

2023-01-24 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108510 --- Comment #2 from Li Shaohua --- Sure: (compiler explorer: https://godbolt.org/z/3qEavnan5) % cat a.c int a; char b; int *c = , *d; long e; int main() { long *f = { int g=0; d = } *d << (b = ((*f)--, c || *d)); } %

[Bug sanitizer/108514] New: ASAN at -O0 missed a stack-use-after-scope

2023-01-24 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108514 Bug ID: 108514 Summary: ASAN at -O0 missed a stack-use-after-scope Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug sanitizer/108510] New: ASAN missed a stack-use-after-scope at -O1

2023-01-24 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108510 Bug ID: 108510 Summary: ASAN missed a stack-use-after-scope at -O1 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug sanitizer/108497] New: UBsan at -O1 failed to report an integer-overflow

2023-01-23 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108497 Bug ID: 108497 Summary: UBsan at -O1 failed to report an integer-overflow Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3

[Bug sanitizer/108481] New: UBsan missed a signed integer overflow

2023-01-20 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108481 Bug ID: 108481 Summary: UBsan missed a signed integer overflow Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug sanitizer/108343] New: ASAN at -O3 misses a heap-use-after-free

2023-01-09 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108343 Bug ID: 108343 Summary: ASAN at -O3 misses a heap-use-after-free Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug sanitizer/108094] gcc trunk's ASAN at -O2 and above did not report a stack-use-after-return

2022-12-14 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108094 --- Comment #2 from Li Shaohua --- (In reply to Martin Liška from comment #1) > gcc pr108094.c -g -Wall -Werror -O2 > pr108094.c: In function ‘e’: > pr108094.c:8:10: error: function returns address of local variable >

[Bug sanitizer/108094] New: gcc trunk's ASAN at -O2 and above did not report a stack-use-after-return

2022-12-14 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108094 Bug ID: 108094 Summary: gcc trunk's ASAN at -O2 and above did not report a stack-use-after-return Product: gcc Version: 13.0 Status: UNCONFIRMED Severity:

[Bug sanitizer/108085] New: gcc trunk's ASAN at -O3 missed a stack-use-after-scope

2022-12-13 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108085 Bug ID: 108085 Summary: gcc trunk's ASAN at -O3 missed a stack-use-after-scope Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3

[Bug sanitizer/108060] New: UBsan missed an out-of-bound bug at -O0

2022-12-11 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108060 Bug ID: 108060 Summary: UBsan missed an out-of-bound bug at -O0 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug sanitizer/108029] GCC'ASAN at -O0 failed to detect a memory leak

2022-12-09 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108029 --- Comment #3 from Li Shaohua --- (In reply to Li Shaohua from comment #2) > (In reply to Martin Liška from comment #1) > > I can see the leak with both gcc-12 and gcc master. > > Interesting, because I tested using Compiler explorer. On my

[Bug sanitizer/108029] GCC'ASAN at -O0 failed to detect a memory leak

2022-12-09 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108029 --- Comment #2 from Li Shaohua --- (In reply to Martin Liška from comment #1) > I can see the leak with both gcc-12 and gcc master. Interesting, because I tested using Compiler explorer. On my local machines, some gcc-12 -O0 won't report, but

[Bug sanitizer/108029] New: GCC'ASAN at -O0 failed to detect a memory leak

2022-12-09 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108029 Bug ID: 108029 Summary: GCC'ASAN at -O0 failed to detect a memory leak Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug sanitizer/108023] New: Incorrect line number in ASAN's report

2022-12-08 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108023 Bug ID: 108023 Summary: Incorrect line number in ASAN's report Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug sanitizer/108014] New: Incorrect line number in UBSAN's report

2022-12-07 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108014 Bug ID: 108014 Summary: Incorrect line number in UBSAN's report Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug sanitizer/107912] New: UBsan at -O0 missed a signed integer overflow

2022-11-29 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107912 Bug ID: 107912 Summary: UBsan at -O0 missed a signed integer overflow Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug sanitizer/107908] New: A null pointer dereference bug was missed by UBsan at -O0

2022-11-29 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107908 Bug ID: 107908 Summary: A null pointer dereference bug was missed by UBsan at -O0 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal

[Bug sanitizer/107893] gcc trunk at -O0 (UBSan) misses a Null-pointer-dereference

2022-11-28 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107893 --- Comment #4 from Li Shaohua --- (In reply to Richard Biener from comment #3) > That is, > > int main() { > int *a = 0; >(a[0] | a[1]) >> 056; > } > > works at -O0: > > t.c:3:6: runtime error: load of null pointer of type 'int' Yes,

[Bug sanitizer/107893] New: gcc trunk at -O0 (UBSan) misses a Null-pointer-dereference

2022-11-28 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107893 Bug ID: 107893 Summary: gcc trunk at -O0 (UBSan) misses a Null-pointer-dereference Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal

[Bug sanitizer/107866] [12/13 Regression] gcc trunk's UBSan misses a Null-pointer-dereference at -O3.

2022-11-25 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107866 --- Comment #2 from Li Shaohua --- (In reply to Jakub Jelinek from comment #1) > This isn't reported since r12-3918-g5b8b1522e04adc20980f396571be1929a32d148a > I wonder what is the point of -O3 -fsanitize=undefined, -fsanitize= severely > slows

[Bug sanitizer/107866] New: gcc trunk's UBSan misses a Nll-pointer-dereference at -O3.

2022-11-25 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107866 Bug ID: 107866 Summary: gcc trunk's UBSan misses a Nll-pointer-dereference at -O3. Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal

[Bug sanitizer/107806] New: gcc trunk at -O3 misses a global-buffer-overflow

2022-11-22 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107806 Bug ID: 107806 Summary: gcc trunk at -O3 misses a global-buffer-overflow Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3

[Bug sanitizer/107752] Lack of column information in AddressSanitizer reports

2022-11-18 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107752 --- Comment #3 from Li Shaohua --- (In reply to Andrew Pinski from comment #1) > Do you mean the column information rather than offset? Yes, I meant the column information. I don’t know the implementation details of ASAN. But as UBsan can

[Bug sanitizer/107752] New: Lack of offset information in AddressSanitizer reports

2022-11-18 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107752 Bug ID: 107752 Summary: Lack of offset information in AddressSanitizer reports Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3

[Bug sanitizer/107747] New: gcc trunk at -Os misses a global-buffer-overflow

2022-11-18 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107747 Bug ID: 107747 Summary: gcc trunk at -Os misses a global-buffer-overflow Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3

[Bug sanitizer/107746] New: gcc -O1 misses a stack-buffer-overflow

2022-11-18 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107746 Bug ID: 107746 Summary: gcc -O1 misses a stack-buffer-overflow Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug sanitizer/107698] ASAN misses a global-buffer-overflow

2022-11-16 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107698 --- Comment #2 from Li Shaohua --- I found a new test where gcc-O1 misses the global-buffer-overflow. Not sure if these two have the same root cause: % cat a.c int a, c; int *b = int main() { int d = *b; for (; c < 3; c++) b = b + (d

[Bug sanitizer/107698] New: ASAN misses a global-buffer-overflow

2022-11-15 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107698 Bug ID: 107698 Summary: ASAN misses a global-buffer-overflow Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer

[Bug sanitizer/107696] GCC trunk misses a stack-buffer-overflow

2022-11-15 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107696 --- Comment #4 from Li Shaohua --- Thanks for the prompt reply.

[Bug sanitizer/107696] GCC trunk misses a stack-buffer-overflow

2022-11-15 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107696 --- Comment #2 from Li Shaohua --- (In reply to Martin Liška from comment #1) > > int i; > > int a[1]; > > for (; i < 1;){ > > This depends on the uninitialized value of 'i', which is: > > (gdb) p i > $1 = 32767 > > if I run it

[Bug sanitizer/107696] New: GCC trunk misses a stack-buffer-overflow

2022-11-15 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107696 Bug ID: 107696 Summary: GCC trunk misses a stack-buffer-overflow Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug sanitizer/107619] New: False positive of -fsanitize=null

2022-11-10 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107619 Bug ID: 107619 Summary: False positive of -fsanitize=null Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer

[Bug sanitizer/107586] New: gcc trunk missed a stack-buffer-overflow

2022-11-09 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107586 Bug ID: 107586 Summary: gcc trunk missed a stack-buffer-overflow Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug sanitizer/106558] ASan failed to detect a global-buffer-overflow

2022-11-07 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106558 --- Comment #14 from Li Shaohua --- Hello, is this patch going to be pushed to the trunk?

[Bug c/107493] New: Wrong code at -Os on x86_64-linux-gnu

2022-11-01 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107493 Bug ID: 107493 Summary: Wrong code at -Os on x86_64-linux-gnu Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c

[Bug sanitizer/107431] UBSan has inconsistent behaviors in certain code snippet

2022-10-27 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107431 --- Comment #2 from Li Shaohua --- Thanks a lot for the prompt reply!

[Bug sanitizer/107431] New: UBSan has inconsistent behaviors in certain code snippet

2022-10-27 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107431 Bug ID: 107431 Summary: UBSan has inconsistent behaviors in certain code snippet Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal

[Bug sanitizer/107410] ASan failed to detect a heap-buffer-overflow

2022-10-26 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107410 --- Comment #1 from Li Shaohua --- Compiler explorer: https://godbolt.org/z/9aqvx71xo

[Bug sanitizer/107410] New: ASan failed to detect a heap-buffer-overflow

2022-10-26 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107410 Bug ID: 107410 Summary: ASan failed to detect a heap-buffer-overflow Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug c/107407] New: Wrong code at -Os on x86_64-linux-gnu

2022-10-26 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107407 Bug ID: 107407 Summary: Wrong code at -Os on x86_64-linux-gnu Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c

[Bug c/107387] New: gcc trunk -O2 crashes when enable UBSan

2022-10-24 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107387 Bug ID: 107387 Summary: gcc trunk -O2 crashes when enable UBSan Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c

[Bug c/107293] New: Wrong code at -Os on x86_64-linux-gnu

2022-10-17 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107293 Bug ID: 107293 Summary: Wrong code at -Os on x86_64-linux-gnu Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c

[Bug c/107257] Wrong code at -O2 on x86_64-linux-gnu

2022-10-17 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107257 Li Shaohua changed: What|Removed |Added Resolution|INVALID |--- Status|RESOLVED

[Bug sanitizer/107258] New: ASAN at -O1 failed to detect a stack-under-flow

2022-10-14 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107258 Bug ID: 107258 Summary: ASAN at -O1 failed to detect a stack-under-flow Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug c/107257] New: Wrong code at -O2 on x86_64-linux-gnu

2022-10-14 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107257 Bug ID: 107257 Summary: Wrong code at -O2 on x86_64-linux-gnu Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c

[Bug c/107246] New: gcc trunk crash in verify_gimple_in_cfg

2022-10-13 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107246 Bug ID: 107246 Summary: gcc trunk crash in verify_gimple_in_cfg Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c

[Bug c/107176] New: Wrong code at -O0/-Os on x86_64-pc-linux-gnu

2022-10-06 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107176 Bug ID: 107176 Summary: Wrong code at -O0/-Os on x86_64-pc-linux-gnu Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c

[Bug sanitizer/107086] New: gcc trunkc at -O1 failed to detect a stack-use-after-return

2022-09-29 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107086 Bug ID: 107086 Summary: gcc trunkc at -O1 failed to detect a stack-use-after-return Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal

[Bug tree-optimization/106995] gcc-trunk crash at -O2

2022-09-21 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106995 --- Comment #1 from Li Shaohua --- Sorry, it should be `gcc-tk -w -O2 a.c`

[Bug c/106995] New: gcc-trunk crash at -O2

2022-09-21 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106995 Bug ID: 106995 Summary: gcc-trunk crash at -O2 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee:

[Bug c/106892] Wrong code at -O3 on x86_64-linux-gnu

2022-09-09 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106892 --- Comment #3 from Li Shaohua --- Yes, I reduced it too much. Here is the new one with return value in g() function. a, b, c, d, e; f[8]; g() { while (a) a >>= 4; return 0; } h(i) { if (i >= '0') return i - '0'; } j(i) { b =

[Bug c/106892] New: Wrong code at -O3 on x86_64-linux-gnu

2022-09-08 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106892 Bug ID: 106892 Summary: Wrong code at -O3 on x86_64-linux-gnu Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c

[Bug sanitizer/106591] New: ASan at -O1 fails to detect a global buffer overflow

2022-08-12 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106591 Bug ID: 106591 Summary: ASan at -O1 fails to detect a global buffer overflow Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3

[Bug sanitizer/106558] New: ASan failed to detect a global-buffer-overflow

2022-08-08 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106558 Bug ID: 106558 Summary: ASan failed to detect a global-buffer-overflow Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug sanitizer/106368] New: ASan fails to report an error.

2022-07-20 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106368 Bug ID: 106368 Summary: ASan fails to report an error. Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer

[Bug sanitizer/105697] GCC trunk failed to detect a stack buffer-overflow

2022-06-01 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105697 --- Comment #2 from Li Shaohua --- I think the volatile keyword in function parameters is critical to this bug.

[Bug sanitizer/105750] Too small red zone size for struct variables.

2022-05-27 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105750 --- Comment #2 from Li Shaohua --- Yea, I'm aware of that. What makes me confused is for the following code, gcc generates a larger redone for the struct variable j, i.e., 48 bytes. https://godbolt.org/z/Wv1djjrqv $cat b.c struct a { long

[Bug sanitizer/105750] New: Too small red zone size for struct variables.

2022-05-27 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105750 Bug ID: 105750 Summary: Too small red zone size for struct variables. Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug sanitizer/105714] New: ASan in gcc trunk missed a buffer-overflow at -Os

2022-05-24 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105714 Bug ID: 105714 Summary: ASan in gcc trunk missed a buffer-overflow at -Os Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3

[Bug sanitizer/105697] New: GCC trunk failed to detect a stack buffer-overflow

2022-05-23 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105697 Bug ID: 105697 Summary: GCC trunk failed to detect a stack buffer-overflow Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3

[Bug tree-optimization/105618] New: Missed loop body simplification by -O3 (trunk v.s. 10.3)

2022-05-16 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105618 Bug ID: 105618 Summary: Missed loop body simplification by -O3 (trunk v.s. 10.3) Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal

[Bug sanitizer/105592] New: array out of bound not detected by ubsan

2022-05-13 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105592 Bug ID: 105592 Summary: array out of bound not detected by ubsan Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug sanitizer/105405] missed buffer-overflow in -O0

2022-04-28 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105405 --- Comment #4 from Li Shaohua --- @Jakub, I agree with you that the above test case may access too far from the red zone. However, for the below test case, I cannot figure out why -O0 again did not report anything. As a user, I would think

[Bug sanitizer/105405] missed buffer-overflow in -O0

2022-04-27 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105405 --- Comment #2 from Li Shaohua --- Yeah, I've tried that fix. It didn't fix the issue though.

[Bug sanitizer/105405] New: missed buffer-overflow in -O0

2022-04-27 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105405 Bug ID: 105405 Summary: missed buffer-overflow in -O0 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer

[Bug sanitizer/105396] New: missed stack-buffer-overflow by -O0

2022-04-26 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105396 Bug ID: 105396 Summary: missed stack-buffer-overflow by -O0 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer

[Bug sanitizer/105155] -fsanitize=signed-integer-overflow failed to check an overflow

2022-04-05 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105155 --- Comment #2 from Li Shaohua --- (In reply to Richard Biener from comment #1) > We fold this already before gimplification to > > ;; Function foo (null) > ;; enabled by -tree-original > > > { > return a > 0 ? -2147483648(OVF) :

[Bug sanitizer/105155] New: -fsanitize=signed-integer-overflow failed to check an overflow

2022-04-04 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105155 Bug ID: 105155 Summary: -fsanitize=signed-integer-overflow failed to check an overflow Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal

[Bug sanitizer/105141] #pragma pack(1) causes incorrect UBSAN warning

2022-04-03 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105141 --- Comment #5 from Li Shaohua --- No, I meant #pragma pack(1) struct { char a[3]; int b; } c;

[Bug sanitizer/105141] #pragma pack(1) causes incorrect UBSAN warning

2022-04-03 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105141 --- Comment #3 from Li Shaohua --- Thanks for your explanation. struct { char a[3]; int b; } c; When I did this, the warning did not show up. Should it still be misaligned?

[Bug sanitizer/105141] New: #pragma pack(1) causes incorrect UBSAN warning

2022-04-03 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105141 Bug ID: 105141 Summary: #pragma pack(1) causes incorrect UBSAN warning Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug sanitizer/105107] false positive stack-buffer-overflow in ASAN

2022-03-30 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105107 --- Comment #2 from Li Shaohua --- Thanks for your prompt reply. The warning messages only appeared for -O0 and -O3, not for -O1 and -O2. I wonder this might also be an issue.

[Bug sanitizer/105107] New: false positive stack-buffer-overflow in ASAN

2022-03-30 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105107 Bug ID: 105107 Summary: false positive stack-buffer-overflow in ASAN Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug sanitizer/105084] ASAN false positive on global-buffer-overflow

2022-03-28 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105084 --- Comment #3 from Li Shaohua --- Thanks a lot for your explanation. That makes sense to me :).

[Bug sanitizer/105084] ASAN false positive on global-buffer-overflow

2022-03-28 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105084 --- Comment #1 from Li Shaohua --- Sorry, the triggering program should be the following: $cat a.c int a[] = {3}; int b = 7; main() { unsigned int *c = *c = a[-1]; }

[Bug sanitizer/105084] New: ASAN false positive on global-buffer-overflow

2022-03-28 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105084 Bug ID: 105084 Summary: ASAN false positive on global-buffer-overflow Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug c/103406] New: gcc -O0 behaves differently on "DBL_MAX related operations" than gcc -O1 and above

2021-11-24 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103406 Bug ID: 103406 Summary: gcc -O0 behaves differently on "DBL_MAX related operations" than gcc -O1 and above Product: gcc Version: 11.1.0 Status: UNCONFIRMED

[Bug demangler/101798] New: rust-demangle.c infinite recursion

2021-08-06 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101798 Bug ID: 101798 Summary: rust-demangle.c infinite recursion Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: demangler

<    1   2