Menu

#8 Out-of-bounds array access in sobel

1.0
open
nobody
sobel (2)
2015-05-26
2015-05-26
No


sobel keith$ clang -g *.cpp -I ~/src/systemc/include/ -L ~/src/systemc/lib-macosx64/ -lsystemc -lstdc++ -o go
sobel keith$ file lena512.bmp
lena512.bmp: PC bitmap, Windows 3.x format, 512 x 512 x 8
Keiths-MacBook-Pro-3:sobel keith$ lldb go
(lldb) target create "go"
Current executable set to 'go' (x86_64).
(lldb) run
Process 38920 launched: '/Users/keith/src/s2cbench/S2CBench_v1.1/sobel/go' (x86_64)

    SystemC 2.3.1-Accellera --- May 22 2015 16:50:30
    Copyright (c) 1996-2014 by all Contributors,
    ALL RIGHTS RESERVED

Process 38920 stopped
* thread #1: tid = 0x11eb71, 0x000000010000e95e gotb_sobel::send(this=0x00007fff5fbfece8) + 734 at tb_sobel.cpp:57, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x100780000) frame #0: 0x000000010000e95e gotb_sobel::send(this=0x00007fff5fbfece8) + 734 at tb_sobel.cpp:57
54 input_row[1].write(input_row_write[1]);
55 }
56 else{
-> 57 input_row_write[2]= bitmapData[(i*ROWS)+k];
58 input_row[2].write(input_row_write[2]);
59 }
60 }
(lldb) print i
(int) $0 = 511
(lldb) print k
(int) $1 = 512

Discussion


Log in to post a comment.

MongoDB Logo MongoDB