Closed ppetrovic98 closed 9 months ago
These tests look fine. I just want to know why you chose these combinations: default, -pie , -no-pie and -static. Did you check if the resulting ELF image differ in these three cases? Why is stack-protector flag is interesting to test in core-file?
I used -pie and -no-pie to check corefile reading with memory layout changes due to ASLR. As for ELF image, for non-pie executable, address for various sections are hardcoded to its base address, while the pie executable always assumes a base address of 0. -static generates an ELF image with all code statically linked into the executable, resulting in no dynamic section for library linking, so I thought that could be something worth testing -stack-protector was interesting to me because I thought a stack buffer overflow might alter the expected values on the stack, but I might need to change testing code for it to make sense I left the default testcase in mainly because the rest of the testcases compile that test code, to reduce code redundancy, and also as a default testcase, to test value reading without any flags
I made tests with these compile options based on my research what could affect reading corefile values, but if any of it doesn't make sense, I could make some changes. Or if you had something else in mind, i could add different testcases.