Closed kmurray closed 4 years ago
Thanks for the heads up, I'll have a look :)
Thanks!
From: jeanlego notifications@github.com Sent: Wednesday, February 12, 2020, 8:38 p.m. To: verilog-to-routing/vtr-verilog-to-routing Cc: Kevin Murray; Author Subject: Re: [verilog-to-routing/vtr-verilog-to-routing] Invalid Memory Access in Odin on strong_fpu_hard_block (#1138)
Closed #1138https://github.com/verilog-to-routing/vtr-verilog-to-routing/issues/1138 via #1140https://github.com/verilog-to-routing/vtr-verilog-to-routing/pull/1140.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/verilog-to-routing/vtr-verilog-to-routing/issues/1138?email_source=notifications&email_token=AAKSP7D3RS66BPIANQQMD3LRCSQABA5CNFSM4KUFIX42YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOWTEY3BI#event-3033107845, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAKSP7GMIBCYAM622ZXDPLDRCSQABANCNFSM4KUFIX4Q.
Context
PR #1131 (for issue #1130) is trying to perform a regular sanitizer run of the vtr_reg_basic and vtr_reg_strong regression tests to detect undefined behaviour and memory errors.
The only outstanding issue is a bad memory access in ODIN that should be fixed.
Once fixed PR #1131 should begin passing the sanitizer test.
Steps to Reproduce
Build VTR with sanitizers enabled:
Run the strong_fpu_hard_block test case
See that ODIN fails
Inspect the Odin Run Log to see the failure:
See the error message about buffer overflow from ASAN:
Reading Configuration file Reading FPGA Architecture file
High-level synthesis Begin Parser starting - we'll create an abstract syntax tree. Note this tree can be viewed using Grap Viz (see documentation)/project/trees/vtr/libs/librtlnumber/src/include/internal_bits.hpp:367:52: runtime error: shift exponent 64 is too large for 32-bit type 'int'
==7490==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61c00000e078 at pc 0x55a73f31bdef bp 0x7ffc417cefb0 sp 0x7ffc417cefa0 READ of size 8 at 0x61c00000e078 thread T0
0 0x55a73f31bdee in connect_hard_block_and_alias(ast_node_t, char, int, sc_hierarchy*) /project/trees/vtr/ODIN_II/SRC/netlist_create_from_ast.cpp:1730
0x61c00000e078 is located 8 bytes to the left of 1680-byte region [0x61c00000e080,0x61c00000e710) allocated by thread T0 here:
0 0x7f87dd08dd38 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded38)
SUMMARY: AddressSanitizer: heap-buffer-overflow /project/trees/vtr/ODIN_II/SRC/netlist_create_from_ast.cpp:1730 in connect_hard_block_and_alias(ast_node_t, char, int, sc_hierarchy*) Shadow bytes around the buggy address: 0x0c387fff9bb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c387fff9bc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c387fff9bd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c387fff9be0: 00 00 fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c387fff9bf0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x0c387fff9c00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa[fa] 0x0c387fff9c10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c387fff9c20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c387fff9c30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c387fff9c40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c387fff9c50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb