DynamoRIO / dynamorio

Dynamic Instrumentation Tool Platform
Other
2.61k stars 554 forks source link

i#6514 null SP to clone(), part 3: Handle null SP passed to clone #6601

Closed xdje42 closed 7 months ago

xdje42 commented 7 months ago

The kernel supports passing NULL for SP to clone: It means to use the SP of the parent. Supporting this requires augmenting dynamorio_clone to handle SP==NULL, and augmenting create_clone_record to handle SP==NULL.

Only tested X86 in this pass. Other arches deferred.

With 32-bit testing temporarily downsized, this was manually tested on i386: $ ctest -R clone Test project /home/dje/upstream/i6514/build32 Start 34: code_api|linux.clone 1/3 Test #34: code_api|linux.clone ............. Passed 1.00 sec Start 35: code_api|linux.clone-pie 2/3 Test #35: code_api|linux.clone-pie ......... Passed 0.97 sec Start 100: code_api|linux.clone-reset 3/3 Test #100: code_api|linux.clone-reset ....... Passed 0.97 sec 100% tests passed, 0 tests failed out of 3 Total Test time (real) = 3.03 sec

Issue #6514

derekbruening commented 7 months ago

(Reminder to click re-request review when ready.)