Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASSERT core/emit.c:42 on DR with native_exec #1233

Closed
derekbruening opened this issue Nov 28, 2014 · 4 comments
Closed

ASSERT core/emit.c:42 on DR with native_exec #1233

derekbruening opened this issue Nov 28, 2014 · 4 comments

Comments

@derekbruening
Copy link
Contributor

From [email protected] on July 29, 2013 16:45:59

  1. simple code like
    3 #define NUM_ITERS 10000
    4 #define MALLOC_SIZE 8
    5
    6 int main()
    7 {
    8 int i, j;
    9 void *ptr;
    10 for (i = 0; i < NUM_ITERS; i++) {
    11 for (j = 0; j < NUM_ITERS; j++) {
    12 ptr = malloc(MALLOC_SIZE);
    13 free(ptr);
    14 }
    15 }
    16 return 0;
    17 }

run dr hybrid mode.

~/Workspace/DynamoRIO/builds/build_x64_dbg.git/bin64/drrun -debug -native_exec_list hybrid -native_exec_retakeover -- ./hybrid
<Starting application /home/zhaoqin/Workspace/DynamoRIO/tests/hybrid (7592)>
<Initial options = -code_api -stack_size 56K -max_elide_jmp 0 -max_elide_call 0 -no_inline_ignored_syscalls -native_exec_default_list '' -native_exec_list 'hybrid' -no_native_exec_managed_code -native_exec_retakeover -no_indcall2direct >

Original issue: http://code.google.com/p/dynamorio/issues/detail?id=1233

@derekbruening
Copy link
Contributor Author

From [email protected] on July 29, 2013 13:53:06

It seems the problem related to trace building. -disable_traces works fine.

@derekbruening
Copy link
Contributor Author

From [email protected] on July 29, 2013 15:51:37

This issue was closed by revision r2221 .

Status: Fixed

@derekbruening
Copy link
Contributor Author

From [email protected] on July 31, 2013 09:06:40

More investigation:

(gdb) where
#0 syscall_ready () at /home/zhaoqin/Workspace/DynamoRIO/dynamorio.svn/core/x86/x86.asm:1132
#1 0x000000007160f590 in ?? () from /home/zhaoqin/Workspace/DynamoRIO/builds/build_x64_dbg.svn/bin64/../lib64/debug/libdynamorio.so
#2 0x00000000712d6589 in read_syscall (fd=0, buf=0x4e9bd9b7, nbytes=1) at /home/zhaoqin/Workspace/DynamoRIO/dynamorio.svn/core/unix/os.c:3783
#3 0x00000000712d6d1b in os_read (f=0, buf=0x4e9bd9b7, count=1) at /home/zhaoqin/Workspace/DynamoRIO/dynamorio.svn/core/unix/os.c:3997
#4 0x000000007111f90b in notify (priority=SYSLOG_ERROR, internal=false, synch=false, substitution_num=3, prefix=0x713396d8 "SYSLOG_ERROR",
fmt=0x7133ad38 "Application %s (%s). Internal Error %s") at /home/zhaoqin/Workspace/DynamoRIO/dynamorio.svn/core/utils.c:1953
#5 0x000000007111ff33 in report_dynamorio_problem (dcontext=0x4e944d80, dumpcore_flag=8, exception_addr=0x0, report_ebp=0x4e9be400 "`\345\233N",
fmt=0x71339670 "Internal DynamoRIO Error: %s:%d %s\n(Error occurred @%d frags)") at /home/zhaoqin/Workspace/DynamoRIO/dynamorio.svn/core/utils.c:2202
#6 0x000000007111a7ff in internal_error (file=0x71337938 "/home/zhaoqin/Workspace/DynamoRIO/dynamorio.svn/core/emit.c", line=424,
expr=0x71338240 "!TEST(FRAG_SHARED, flags) || INTERNAL_OPTION(single_thread_in_DR) || !USE_BB_BUILDING_LOCK() || OWN_MUTEX(&bb_building_lock) || OWN_MUTEX(&trace_building_lock)") at /home/zhaoqin/Workspace/DynamoRIO/dynamorio.svn/core/utils.c:174
#7 0x0000000071113820 in emit_fragment_common (dcontext=0x4e944d80,
tag=0x4005c5 <main+65> "H\213E\360H\211\307\350\217\376\377\377\203E\374\001\203}\374cÃE\370\001\203}\370c\260\270", ilist=0x4e9c2358, flags=58720256,
vmlist=0x4e9cad48, link_fragment=true, add_to_htable=false, replace_fragment=0x0) at /home/zhaoqin/Workspace/DynamoRIO/dynamorio.svn/core/emit.c:422
#8 0x000000007111a31f in emit_fragment_ex (dcontext=0x4e944d80,
tag=0x4005c5 <main+65> "H\213E\360H\211\307\350\217\376\377\377\203E\374\001\203}\374cÃE\370\001\203}\370c\260\270", ilist=0x4e9c2358, flags=58720256,
vmlist=0x4e9cad48, link=true, visible=false) at /home/zhaoqin/Workspace/DynamoRIO/dynamorio.svn/core/emit.c:994
#9 0x000000007126b2e7 in build_basic_block_fragment (dcontext=0x4e944d80,
start=0x4005c5 <main+65> "H\213E\360H\211\307\350\217\376\377\377\203E\374\001\203}\374cÃE\370\001\203}\370c\260\270", initial_flags=33554432, link=true,
visible=false, for_trace=true, unmangled_ilist=0x0) at /home/zhaoqin/Workspace/DynamoRIO/dynamorio.svn/core/x86/interp.c:4557
#10 0x00000000711b58ed in create_private_copy (dcontext=0x4e944d80, f=0x4e99eb18) at /home/zhaoqin/Workspace/DynamoRIO/dynamorio.svn/core/monitor.c:186
#11 0x00000000711be7a5 in monitor_cache_enter (dcontext=0x4e944d80, f=0x4e99eb18) at /home/zhaoqin/Workspace/DynamoRIO/dynamorio.svn/core/monitor.c:2336
#12 0x0000000071104afe in dispatch (dcontext=0x4e944d80) at /home/zhaoqin/Workspace/DynamoRIO/dynamorio.svn/core/dispatch.c:171

@derekbruening
Copy link
Contributor Author

From [email protected] on August 02, 2013 15:09:42

This issue was closed by revision r2232 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant