-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getting crash on writing to readonly memory region while generating ec for exception #99
Comments
It appears that when the c'tor of loc is first created, the empty string ("") value should be written to this members of loc which are stored in __DATA_CONST section. Maybe the compiler should allow writing the __DATA_CONST section upon construction of constexpr like in this case, and prevent further writes from this point onward (I guess not). I'm using macOS M1/M2 architecture with Xcode/LLVM compiler, Perhaps do you know if there's a compilation flag that enables it ? |
Without seeing the disassembly around the crash address, it's hard to tell what exactly is going on. |
The and it's possible that |
The location of the error code is probably set here https://github.com/boostorg/asio/blob/723eee7a402f5bd1c39a4821fc4951abfe0d0bbd/include/boost/asio/detail/reactive_socket_service.hpp#L587 although I'm not sure whether this is the right socket implementation for macOS. |
I'm trying to figure out a crash dump that I got when initiating a boost implementation of unix domain socket.
What's strange about it is that the relevant frame is when it parsed the ec.what() which is a function that basically create a string message ...
Besides the callstack, I could generate a crash file with a crash reason
So It seems like when the ec message is created, we attempt to write a read only memory (DATA_CONST) . I think that this is the problematic code :
which is called from here
However, i don't understand where do we attempt to write to the const expression 'loc'... any idea what may be the reason ?
The text was updated successfully, but these errors were encountered: