Jump to content
mohitnegi

Bus Error(Core dump)

Recommended Posts

Hello guyz ,

i am getting this error on a particular notification

below is the stack

Program received signal SIGBUS, Bus error.
0x00007ffff7d0317e in sc_core::sc_event::notify(sc_core::sc_time const&) () from /usr/local/systemc-2.3.1/lib-linux64/libsystemc-2.3.1.so
(gdb) backtrace
#0  0x00007ffff7d0317e in sc_core::sc_event::notify(sc_core::sc_time const&) () from /usr/local/systemc-2.3.1/lib-linux64/libsystemc-2.3.1.so
#1  0x00000000004225c2 in logical_unit<unsigned int, 32u>::response (this=0x6f5220, task_comand=33 '!', rsponse=0 '\000', lun1=2 '\002', t_tag=17 '\021')
    at /home/mic-24/Desktop/qemu+other/ufs_dropbox_21/include/logical_unit.tpp:1314
#2  0x0000000000429d44 in logical_unit<unsigned int, 32u>::lu1_data_in (this=0x6f5220, current_cmd=..., opcode_current_cmd=8 '\b', lu_resent_data=0 '\000', 
    lun_ftl=1 '\001') at /home/mic-24/Desktop/qemu+other/ufs_dropbox_21/include/logical_unit.tpp:458
#3  0x0000000000424028 in logical_unit<unsigned int, 32u>::command_processing (this=0x6f5220, lu_resent_data=0 '\000', lun_ftl=1 '\001')
    at /home/mic-24/Desktop/qemu+other/ufs_dropbox_21/include/logical_unit.tpp:199
#4  0x000000000041bd22 in logical_unit<unsigned int, 32u>::logical_unit_thread (this=0x6f5220)
    at /home/mic-24/Desktop/qemu+other/ufs_dropbox_21/include/logical_unit.tpp:37
#5  0x0000000000416979 in device<unsigned int, 32u>::logical_unit_trans (this=0x6dce00) at /home/mic-24/Desktop/qemu+other/ufs_dropbox_21/include/device.tpp:315
#6  0x00007ffff7d1dde6 in sc_core::sc_thread_cor_fn(void*) () from /usr/local/systemc-2.3.1/lib-linux64/libsystemc-2.3.1.so
#7  0x00007ffff7d0248b in sc_core::sc_cor_pthread::invoke_module_method(void*) () from /usr/local/systemc-2.3.1/lib-linux64/libsystemc-2.3.1.so
#8  0x0000003362a079d1 in start_thread () from /lib64/libpthread.so.0
#9  0x00000033626e886d in clone () from /lib64/libc.so.6
(gdb) 

Share this post


Link to post
Share on other sites

 

Hello guyz ,

i am getting this error on a particular notification

below is the stack

Program received signal SIGBUS, Bus error.
0x00007ffff7d0317e in sc_core::sc_event::notify(sc_core::sc_time const&) () from /usr/local/systemc-2.3.1/lib-linux64/libsystemc-2.3.1.so
(gdb) backtrace
#0  0x00007ffff7d0317e in sc_core::sc_event::notify(sc_core::sc_time const&) () from /usr/local/systemc-2.3.1/lib-linux64/libsystemc-2.3.1.so
#1  0x00000000004225c2 in logical_unit<unsigned int, 32u>::response (this=0x6f5220, task_comand=33 '!', rsponse=0 '\000', lun1=2 '\002', t_tag=17 '\021')
    at /home/mic-24/Desktop/qemu+other/ufs_dropbox_21/include/logical_unit.tpp:1314
#2  0x0000000000429d44 in logical_unit<unsigned int, 32u>::lu1_data_in (this=0x6f5220, current_cmd=..., opcode_current_cmd=8 '\b', lu_resent_data=0 '\000', 
    lun_ftl=1 '\001') at /home/mic-24/Desktop/qemu+other/ufs_dropbox_21/include/logical_unit.tpp:458
#3  0x0000000000424028 in logical_unit<unsigned int, 32u>::command_processing (this=0x6f5220, lu_resent_data=0 '\000', lun_ftl=1 '\001')
    at /home/mic-24/Desktop/qemu+other/ufs_dropbox_21/include/logical_unit.tpp:199
#4  0x000000000041bd22 in logical_unit<unsigned int, 32u>::logical_unit_thread (this=0x6f5220)
    at /home/mic-24/Desktop/qemu+other/ufs_dropbox_21/include/logical_unit.tpp:37
#5  0x0000000000416979 in device<unsigned int, 32u>::logical_unit_trans (this=0x6dce00) at /home/mic-24/Desktop/qemu+other/ufs_dropbox_21/include/device.tpp:315
#6  0x00007ffff7d1dde6 in sc_core::sc_thread_cor_fn(void*) () from /usr/local/systemc-2.3.1/lib-linux64/libsystemc-2.3.1.so
#7  0x00007ffff7d0248b in sc_core::sc_cor_pthread::invoke_module_method(void*) () from /usr/local/systemc-2.3.1/lib-linux64/libsystemc-2.3.1.so
#8  0x0000003362a079d1 in start_thread () from /lib64/libpthread.so.0
#9  0x00000033626e886d in clone () from /lib64/libc.so.6
(gdb) 

 

Hello Sir,

Core dumps/segmentation faults are almost always the result of

trying to dereference a null pointer. A quick way to prevent these

is to have good old C style guards as:

if(<pointer_name> != NULL) { /* dereference pointer */}

Else, stick to C++ style references. Hope that helps.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×