Posts: 6.069
Threads: 68
Joined: May 2010
Reputation:
167
Location: Grenoble, France
Not exactly.
A sigsegv is a memory signal (often (wrongly) call segmentation fault). PCSX2 uses a virtual memory that is not fully allocated. Allocation will only be done once you access it. This access will generate an expected sigsegv. I didn't find any nice way to separate the good sigsegv from the bad. Normally the bad will send an abort signal, so disabled gdb sigsegv handler will work.
Posts: 7.414
Threads: 66
Joined: Nov 2008
Reputation:
122
Location: Germany
Every time I hear about this I wonder if there isn't some saner way to do this..
Posts: 6.069
Threads: 68
Joined: May 2010
Reputation:
167
Location: Grenoble, France
Well no. SIGSEGV is really the signal that handle bad memory access.
However I'm not sure Jake's reservation system is really critical on linux. 32 bits linux gets 3GB (technically you can choose it in the kernel) of VMem (could be 4GB with pae). And 64 bits linux gets 4GB of VMem. Versus the only 2GB of standards 32bit windows.
Note: I'm not sure it is used only for reservation.
Posts: 80
Threads: 2
Joined: Feb 2014
Reputation:
2
Location: New York, NY
Thanks for being patient with me... I am not as experienced with low level programming!
I was able to narrow it down to my std::mutex implementation of GSCritSec.
"I know now why you cry... but it is something I can never do."
-Emotion Engine
Posts: 80
Threads: 2
Joined: Feb 2014
Reputation:
2
Location: New York, NY
How recent was the asan option added? I just got from upstream this morning.
"I know now why you cry... but it is something I can never do."
-Emotion Engine
Posts: 80
Threads: 2
Joined: Feb 2014
Reputation:
2
Location: New York, NY
If you could be so kind as to walk me through the debugging process...
where do I drop ASAN_OPTIONS=allow_user_segv_handler=1?
or is
Code:
ASAN_OPTIONS=allow_user_segv_handler=1 ./bin/pcsx2-dbg
all one line in the terminal?
"I know now why you cry... but it is something I can never do."
-Emotion Engine
Posts: 80
Threads: 2
Joined: Feb 2014
Reputation:
2
Location: New York, NY
hmm... I have no binary named pcsx2-gdb. Should I be getting one after building with the --asan option?
"I know now why you cry... but it is something I can never do."
-Emotion Engine