Sunday, 12 June 2016

[gccsdk] [Bug 262] New: GCC 4.7.4 Rel 2 buffer overflow detected when -Os used

http://www.riscos.info/bugzilla3/show_bug.cgi?id=262

Summary: GCC 4.7.4 Rel 2 buffer overflow detected when -Os used
Product: GCC/GCCSDK
Version: other
Platform: Other
OS/Version: RISC OS
Status: NEW
Severity: feature request
Priority: P1
Component: C compiler
AssignedTo: leenoar@sky.com
ReportedBy: dave@davespace.co.uk
Estimated Hours: 0.0


Created attachment 86
--> http://www.riscos.info/bugzilla3/attachment.cgi?id=86
Preprocessed source file to repro the issue.

GCCSDK 4.7.4 release 2 built locally on Ubuntu 14.04.4 LTS.

Compiler crashes when -Os is used. Log attached. Any other -O level seems fine.

Preprocessed source attached.

jenkins@microserver:~/workspace/PrivateEye/libs/appengine$
/home/dave/src/gccsdk/cross/bin/arm-unknown-riscos-gcc -c walk-cont.pp.c -o
datastruct/hash/walk-cont.o -Os
*** buffer overflow detected ***:
/home/dave/src/gccsdk/cross/libexec/gcc/arm-unknown-riscos/4.7.4/cc1 terminated
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7329f)[0x7f848493b29f]
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7f84849d2bbc]
/lib/x86_64-linux-gnu/libc.so.6(+0x109a90)[0x7f84849d1a90]
/lib/x86_64-linux-gnu/libc.so.6(+0x108c2b)[0x7f84849d0c2b]
/home/dave/src/gccsdk/cross/libexec/gcc/arm-unknown-riscos/4.7.4/cc1[0x9ef503]
/home/dave/src/gccsdk/cross/libexec/gcc/arm-unknown-riscos/4.7.4/cc1(final_scan_insn+0xba9)[0x625b39]
/home/dave/src/gccsdk/cross/libexec/gcc/arm-unknown-riscos/4.7.4/cc1(final+0x24a)[0x6264ea]
/home/dave/src/gccsdk/cross/libexec/gcc/arm-unknown-riscos/4.7.4/cc1[0x6266e6]
/home/dave/src/gccsdk/cross/libexec/gcc/arm-unknown-riscos/4.7.4/cc1(execute_one_pass+0xfe)[0x705b9e]
/home/dave/src/gccsdk/cross/libexec/gcc/arm-unknown-riscos/4.7.4/cc1(execute_pass_list+0x15)[0x705ee5]
/home/dave/src/gccsdk/cross/libexec/gcc/arm-unknown-riscos/4.7.4/cc1(execute_pass_list+0x27)[0x705ef7]
/home/dave/src/gccsdk/cross/libexec/gcc/arm-unknown-riscos/4.7.4/cc1(execute_pass_list+0x27)[0x705ef7]
/home/dave/src/gccsdk/cross/libexec/gcc/arm-unknown-riscos/4.7.4/cc1(tree_rest_of_compilation+0x73)[0x7da763]
/home/dave/src/gccsdk/cross/libexec/gcc/arm-unknown-riscos/4.7.4/cc1[0x59644a]
/home/dave/src/gccsdk/cross/libexec/gcc/arm-unknown-riscos/4.7.4/cc1(cgraph_optimize+0x6bc)[0x597d3c]
/home/dave/src/gccsdk/cross/libexec/gcc/arm-unknown-riscos/4.7.4/cc1(cgraph_finalize_compilation_unit+0x75)[0x5980f5]
/home/dave/src/gccsdk/cross/libexec/gcc/arm-unknown-riscos/4.7.4/cc1(c_write_global_declarations+0xf8)[0x4de978]
/home/dave/src/gccsdk/cross/libexec/gcc/arm-unknown-riscos/4.7.4/cc1(toplev_main+0xacc)[0x79516c]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7f84848e9f45]
/home/dave/src/gccsdk/cross/libexec/gcc/arm-unknown-riscos/4.7.4/cc1[0x4cde5f]
======= Memory map: ========
00400000-010fd000 r-xp 00000000 08:42 6678470
/home/dave/src/gccsdk/cross/libexec/gcc/arm-unknown-riscos/4.7.4/cc1
012fc000-012fd000 r--p 00cfc000 08:42 6678470
/home/dave/src/gccsdk/cross/libexec/gcc/arm-unknown-riscos/4.7.4/cc1
012fd000-0130d000 rw-p 00cfd000 08:42 6678470
/home/dave/src/gccsdk/cross/libexec/gcc/arm-unknown-riscos/4.7.4/cc1
0130d000-014a4000 rw-p 00000000 00:00 0
026ae000-02938000 rw-p 00000000 00:00 0 [heap]
7f84848c8000-7f8484a82000 r-xp 00000000 08:42 2101535
/lib/x86_64-linux-gnu/libc-2.19.so
7f8484a82000-7f8484c82000 ---p 001ba000 08:42 2101535
/lib/x86_64-linux-gnu/libc-2.19.so
7f8484c82000-7f8484c86000 r--p 001ba000 08:42 2101535
/lib/x86_64-linux-gnu/libc-2.19.so
7f8484c86000-7f8484c88000 rw-p 001be000 08:42 2101535
/lib/x86_64-linux-gnu/libc-2.19.so
7f8484c88000-7f8484c8d000 rw-p 00000000 00:00 0
7f8484c8d000-7f8484ca3000 r-xp 00000000 08:42 2110253
/lib/x86_64-linux-gnu/libgcc_s.so.1
7f8484ca3000-7f8484ea2000 ---p 00016000 08:42 2110253
/lib/x86_64-linux-gnu/libgcc_s.so.1
7f8484ea2000-7f8484ea3000 rw-p 00015000 08:42 2110253
/lib/x86_64-linux-gnu/libgcc_s.so.1
7f8484ea3000-7f8484f89000 r-xp 00000000 08:42 3145839
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19
7f8484f89000-7f8485188000 ---p 000e6000 08:42 3145839
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19
7f8485188000-7f8485190000 r--p 000e5000 08:42 3145839
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19
7f8485190000-7f8485192000 rw-p 000ed000 08:42 3145839
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19
7f8485192000-7f84851a7000 rw-p 00000000 00:00 0
7f84851a7000-7f84851aa000 r-xp 00000000 08:42 2097260
/lib/x86_64-linux-gnu/libdl-2.19.so
7f84851aa000-7f84853a9000 ---p 00003000 08:42 2097260
/lib/x86_64-linux-gnu/libdl-2.19.so
7f84853a9000-7f84853aa000 r--p 00002000 08:42 2097260
/lib/x86_64-linux-gnu/libdl-2.19.so
7f84853aa000-7f84853ab000 rw-p 00003000 08:42 2097260
/lib/x86_64-linux-gnu/libdl-2.19.so
7f84853ab000-7f84854b0000 r-xp 00000000 08:42 2097255
/lib/x86_64-linux-gnu/libm-2.19.so
7f84854b0000-7f84856af000 ---p 00105000 08:42 2097255
/lib/x86_64-linux-gnu/libm-2.19.so
7f84856af000-7f84856b0000 r--p 00104000 08:42 2097255
/lib/x86_64-linux-gnu/libm-2.19.so
7f84856b0000-7f84856b1000 rw-p 00105000 08:42 2097255
/lib/x86_64-linux-gnu/libm-2.19.so
7f84856b1000-7f84856d4000 r-xp 00000000 08:42 2101493
/lib/x86_64-linux-gnu/ld-2.19.so
7f84858a8000-7f84858d1000 rw-p 00000000 00:00 0
7f84858d1000-7f84858d3000 rw-p 00000000 00:00 0
7f84858d3000-7f84858d4000 r--p 00022000 08:42 2101493
/lib/x86_64-linux-gnu/ld-2.19.so
7f84858d4000-7f84858d5000 rw-p 00023000 08:42 2101493
/lib/x86_64-linux-gnu/ld-2.19.so
7f84858d5000-7f84858d6000 rw-p 00000000 00:00 0
7ffec4801000-7ffec4822000 rw-p 00000000 00:00 0
[stack]
7ffec4901000-7ffec4903000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0
[vsyscall]
datastruct/hash/walk-cont.c: In function 'hash_walk_continuation':
datastruct/hash/walk-cont.c:95:1: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gccsdk.riscos.info/> for instructions.

--
Configure bugmail: http://www.riscos.info/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.

_______________________________________________
GCCSDK mailing list gcc@gccsdk.riscos.info
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK

No comments:

Post a Comment