I had a crash when I was doing PA2-2-Differential Testing. I collapsed in getopt_long.
The following is a screenshot of the crash.
After a few traceing and debuging with nemu and glibc, I think maybe the flag RTLD_DEEPBIND cause this crash (Of course I am not seting CC_ASAN in Kconfig). When I just open the dynamic library with flag RTLD_LAZY, the program won't crash.
I had a crash when I was doing PA2-2-Differential Testing. I collapsed in getopt_long. The following is a screenshot of the crash.![图片](https://user-images.githubusercontent.com/20366611/161430440-4711daad-d703-491f-a7e4-faec8bbd194f.png)
After a few traceing and debuging with nemu and glibc, I think maybe the flag
RTLD_DEEPBIND
cause this crash (Of course I am not seting CC_ASAN in Kconfig). When I just open the dynamic library with flagRTLD_LAZY
, the program won't crash.https://github.com/NJU-ProjectN/nemu/blob/49366fa402efdbeee305785e15ff21b8e0a660f6/src/cpu/difftest/dut.c#L51
I am not sure about the specific reason, but I hope this information is helpful.