-
Notifications
You must be signed in to change notification settings - Fork 565
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
rank order violation @ -loglevel 4 in client.alloc test #1649
Labels
Comments
Hit another one with modlist_areas:
|
derekbruening
added a commit
that referenced
this issue
Dec 16, 2022
derekbruening
added a commit
that referenced
this issue
Jan 14, 2023
Adds new labels delimiting clean call sequences. Converts into a translation record flag when storing translations. Uses the new labels and flag to precisely identify clean call mangling, replacing the previous scheme which incorrectly thought mangled tool pc-relative was a clean call, resulting in incorrect translations and crashes. Adds a test case to api.detach_state by adding a client (by converting it to use static DR) which inserts a pc-relative load. This reproduces the crash on detach, and is fixed with this fix. The added instrumentation caused periodic detach failures which were solved by setting the translation and adding a restore-state event: i#4232 covers trying to improve the situation. Adds a new instr_t.offset field. Stops using instr_t.note to hold encoding offsets for pc-releative operands. Adds a new field instr_t.offset which is used for this purpose. This leaves note values in place across encodings, which is needed for new clean call marking labels and also simplifies rseq handling code. This instr_t field is a compatibility break and we bump the version and OLDEST_COMPATIBLE_VERSION here to 990. Updates dr_get_note docs. Augments logging of xl8 info with new flag info. Reduces DR_NOTE_FIRST_RESERVED to give DR more reserved labels. This is another compatibility break, while at it. Fixes several issues hit in tests that happened to trigger on the heap bucket size and other changes: + Fixes a rank order violation at loglevel 5: xref #1649 + Writes real xstate_bv into signal frame when setting the xstate context to avoid lazy AVX restore problems. + Tweaks the thread_churn test to work around non-linearities. Issue: #5786, #4232 Fixes #5786
dolanzhao
pushed a commit
that referenced
this issue
Jan 30, 2023
Adds new labels delimiting clean call sequences. Converts into a translation record flag when storing translations. Uses the new labels and flag to precisely identify clean call mangling, replacing the previous scheme which incorrectly thought mangled tool pc-relative was a clean call, resulting in incorrect translations and crashes. Adds a test case to api.detach_state by adding a client (by converting it to use static DR) which inserts a pc-relative load. This reproduces the crash on detach, and is fixed with this fix. The added instrumentation caused periodic detach failures which were solved by setting the translation and adding a restore-state event: i#4232 covers trying to improve the situation. Adds a new instr_t.offset field. Stops using instr_t.note to hold encoding offsets for pc-releative operands. Adds a new field instr_t.offset which is used for this purpose. This leaves note values in place across encodings, which is needed for new clean call marking labels and also simplifies rseq handling code. This instr_t field is a compatibility break and we bump the version and OLDEST_COMPATIBLE_VERSION here to 990. Updates dr_get_note docs. Augments logging of xl8 info with new flag info. Reduces DR_NOTE_FIRST_RESERVED to give DR more reserved labels. This is another compatibility break, while at it. Fixes several issues hit in tests that happened to trigger on the heap bucket size and other changes: + Fixes a rank order violation at loglevel 5: xref #1649 + Writes real xstate_bv into signal frame when setting the xstate context to avoid lazy AVX restore problems. + Tweaks the thread_churn test to work around non-linearities. Issue: #5786, #4232 Fixes #5786
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-loglevel 4 =>
bin32/drrun -debug -loglevel 4 -c suite/tests/bin/libclient.alloc.dll.so -- suite/tests/bin/client.alloc
thank you for testing the client interface testing global memory alloc...success testing nonheap memory alloc...<(1+x) Handling our fault in a TRY at 0xf72742ca> success testing custom memory alloc.... thread_owned_locks->last_lock->rank < lock->rank IF_CLIENT_INTERFACE(|| first_client || both_client)) && "rank order violation" #7 0xf70f692c in read_lock (rw=0xf73a6b20 ) at /work/dr/git/src/core/utils.c:1195 #8 0xf71bbab6 in os_get_module_info_lock () at /work/dr/git/src/core/module_list.c:69 #9 0xf72b1642 in get_module_base (pc=0x49315000 "\177ELF\001\001\001\003") at /work/dr/git/src/core/unix/module.c:319 #10 0xf7192387 in print_vm_area (v=0x4eed67ec, area=0x4eef3950, outf=4000, prefix=0xf730fcef " ")#11 0xf71925fb in print_vm_areas (v=0x4eed67ec, outf=4000) at /work/dr/git/src/core/vmareas.c:781
#12 0xf719306e in add_vm_area (v=0x4eed67ec, start=0xf7775000 "", end=0xf7776000 "\177ELF\001\001\001", vm_flags=3, frag_flags=0,
#13 0xf719c51b in add_dynamo_vm_area (start=0xf7775000 "", end=0xf7776000 "\177ELF\001\001\001", prot=3, unmod_image=true,
#14 0xf71e4d44 in raw_mem_alloc (size=4096, prot=3, addr=0xf7775000, flags=(unknown: 0))
#15 0xf71e51de in custom_memory_shared (alloc=true, drcontext=0x0, flags=(DR_ALLOC_NON_HEAP | DR_ALLOC_FIXED_LOCATION), size=4096,
#16 0xf71e53ee in dr_custom_alloc (drcontext=0x0, flags=(DR_ALLOC_NON_HEAP | DR_ALLOC_FIXED_LOCATION), size=4096, prot=3,
#17 0xf77997fe in custom_test () at /work/dr/git/src/suite/tests/client-interface/alloc.dll.c:372
#18 0xf779a30e in dr_init (id=0) at /work/dr/git/src/suite/tests/client-interface/alloc.dll.c:693
#19 0xf71e03ef in instrument_init () at /work/dr/git/src/core/lib/instrument.c:592
The text was updated successfully, but these errors were encountered: