First, I don’t really have a nvidia card, the problem is reported by at least two of my application user.
Here is the case,
Archlinux enable gl for cairo in order to support wayland, my application uses cairo (by dlopen a plugin linked to cairo, but it doesn’t use opengl at all). So my application pulls in nvidia libgl by cairo now.
the main program only links to some libc library and pthread, and dl.
The problem will occur when it loads a library using curl (which uses pthread), and it will generate werid crash with impossible call stack, so the memory might be somehow corrupted.
And this only happens if the user is using the nvidia libGL library as their libGL.
I found some info about single-threaded and pthread case, but it doesn’t match my case exactly, so I don’t know whether I did something wrong and hit a problem with nvidia libGL.
All dlopen call is called with RTLD_NOW | RTLD_GLOBAL.
The user reports this problem to me have tested with both 313.18, and 313.26.