using madsim 0.2.22,dlsym load an empty pointer #154
-
hi, I am a beginner for madsim. I can use madsim at version 0.2.0-alpha.4,but when I use madsim at version 0.2.22 to test my project, there will throw an error: thread 'main' panicked at 'assertion failed: !ptr.is_null()', /root/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/madsim-0.2.22/src/sim/rand.rs:221:17,which is let ptr = libc::dlsym(libc::RTLD_NEXT, b"getrandom\0".as_ptr() as _); load an empty pointer. how can I fix this problem, thanks for your help |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi, thanks for your feedback. Madsim intercepts the libc |
Beta Was this translation helpful? Give feedback.
Hi, thanks for your feedback. Madsim intercepts the libc
getrandom
function to achieve determinism in simulations. This line is used for calling the original function when we are not in simulation. It seems that madsim couldn't locate the original function in your environment. Could you provide more context about your environment? e.g. OS, libc version, static or dynamic link... That would be helpful for troubleshooting. Thanks!