4 ms·
setjmp, longjmp, jmp_buf are defined in the CRT, not in kernel32. Of course their implementations will eventually depend on kernel32, but that's not relevant to
by Arnavion 5y ago
setjmp, longjmp, jmp_buf are defined in the CRT, not in kernel32. Of course their implementations will eventually depend on kernel32, but that's not relevant to the callers of setjmp/longjmp.
- jcranmer 5y agoIf glibc were set up to have a kernel32/CRT divide like Windows does, I suspect the ABI breakage would have impacted the kernel32 side of the divide, given that the rationale was for better support of hardware stuff in s390. Of course, in Windows, setjmp/longjmp/jmp_buf being the C way of doing things, the implementations live in CRT-land, but the underlying implementation (being essentially SEH/unwind) actually lives in kernel32.
- Arnavion 5y agoSure? My point is, even if it impacted the CRT side of the divide, it would likely have not been a problem, because it would be a new version of the CRT with the breaking API and would not have affected existing code linking to the old CRT. And because libraries are generally more hygienic about not leaking CRT details across their own API boundaries, it would not have been a problem for old and new CRTs to be mixed in the same process.