mohitnegi Posted November 22, 2014 Report Share Posted November 22, 2014 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) Quote Link to comment Share on other sites More sharing options...
David Black Posted November 22, 2014 Report Share Posted November 22, 2014 To help you with this, we really need to see some of the code. On first glance you have a bad reference. I would suggest at least the code surrounding logical_unit.tpp line 1314 Quote Link to comment Share on other sites More sharing options...
dakupoto Posted November 24, 2014 Report Share Posted November 24, 2014 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.