awnumar/memguard

Nil pointer panic before main function call

papazloynt opened this issue · 1 comments

Hello, I am using in my project an imported module github.com/awnumar/fastrand which uses indirect as a dependency on the github.com/awnumar/memguard package. My project works well when launching the release version, but as soon as I switch to debug mode, my program crashes with a panic until the main function is called, here is the error images: .

error occurs right here

find error ocuring code

panic info

panic info

But when I run my program with sudo in debug mode, everything works fine like in relese mode. Please tell me if this is a bug or a feature and what could be the reason for this behavior.
I came across similar issues related to benchmarks and telegraph, but none of the solutions helped me. I would be grateful if you could help me solve my problem, thanks in advance!

This is most likely because debug mode prevents Mlock. Unfortunately memguard doesn't currently support disabling Mlock