whitequark edited PR #1739 from dont-link-to-ntdll
to master
:
The documentation for
RtlNtStatusToDosError
explicitly tells to call it viaGetProcAddress
. The documentation forNtQueryInformationFile
does not, but similar considerations apply because there is normally no import library forntdll
.The main reason to use
GetProcAddress
though is because MinGW does include an import library forntdll
, this import library contains a definition ofsetjmp
, and because of the way rustc orders linker arguments, this definition ofsetjmp
conflicts with and gets picked over the one inmsvcrt
. Usingsetjmp
from ntdll is undesirable as it is an undocumented API and it is missing from wine, making it harder to develop wasmtime using a cross-compiler.Fixes #1738.
whitequark edited PR #1739 from dont-link-to-ntdll
to master
:
The documentation for
RtlNtStatusToDosError
explicitly tells to call it viaGetProcAddress
. The documentation forNtQueryInformationFile
does not, but similar considerations apply because there is normally no import library forntdll
.The main reason to use
GetProcAddress
though is because MinGW does include an import library forntdll
, this import library contains a definition ofsetjmp
, and because of the way rustc orders linker arguments, this definition ofsetjmp
conflicts with and gets picked over the one inmsvcrt
. Usingsetjmp
fromntdll
is undesirable as it is an undocumented API and it is missing from wine, making it harder to develop wasmtime using a cross-compiler.Fixes #1738.
whitequark updated PR #1739 from dont-link-to-ntdll
to master
:
The documentation for
RtlNtStatusToDosError
explicitly tells to call it viaGetProcAddress
. The documentation forNtQueryInformationFile
does not, but similar considerations apply because there is normally no import library forntdll
.The main reason to use
GetProcAddress
though is because MinGW does include an import library forntdll
, this import library contains a definition ofsetjmp
, and because of the way rustc orders linker arguments, this definition ofsetjmp
conflicts with and gets picked over the one inmsvcrt
. Usingsetjmp
fromntdll
is undesirable as it is an undocumented API and it is missing from wine, making it harder to develop wasmtime using a cross-compiler.Fixes #1738.
whitequark updated PR #1739 from dont-link-to-ntdll
to master
:
The documentation for
RtlNtStatusToDosError
explicitly tells to call it viaGetProcAddress
. The documentation forNtQueryInformationFile
does not, but similar considerations apply because there is normally no import library forntdll
.The main reason to use
GetProcAddress
though is because MinGW does include an import library forntdll
, this import library contains a definition ofsetjmp
, and because of the way rustc orders linker arguments, this definition ofsetjmp
conflicts with and gets picked over the one inmsvcrt
. Usingsetjmp
fromntdll
is undesirable as it is an undocumented API and it is missing from wine, making it harder to develop wasmtime using a cross-compiler.Fixes #1738.
whitequark updated PR #1739 from dont-link-to-ntdll
to master
:
The documentation for
RtlNtStatusToDosError
explicitly tells to call it viaGetProcAddress
. The documentation forNtQueryInformationFile
does not, but similar considerations apply because there is normally no import library forntdll
.The main reason to use
GetProcAddress
though is because MinGW does include an import library forntdll
, this import library contains a definition ofsetjmp
, and because of the way rustc orders linker arguments, this definition ofsetjmp
conflicts with and gets picked over the one inmsvcrt
. Usingsetjmp
fromntdll
is undesirable as it is an undocumented API and it is missing from wine, making it harder to develop wasmtime using a cross-compiler.Fixes #1738.
kubkon requested peterhuene for a review on PR #1739.
alexcrichton submitted PR Review.
alexcrichton created PR Review Comment:
Could you add an assert here that
address
isn't null as well?
whitequark submitted PR Review.
whitequark created PR Review Comment:
Done
whitequark updated PR #1739 from dont-link-to-ntdll
to master
:
The documentation for
RtlNtStatusToDosError
explicitly tells to call it viaGetProcAddress
. The documentation forNtQueryInformationFile
does not, but similar considerations apply because there is normally no import library forntdll
.The main reason to use
GetProcAddress
though is because MinGW does include an import library forntdll
, this import library contains a definition ofsetjmp
, and because of the way rustc orders linker arguments, this definition ofsetjmp
conflicts with and gets picked over the one inmsvcrt
. Usingsetjmp
fromntdll
is undesirable as it is an undocumented API and it is missing from wine, making it harder to develop wasmtime using a cross-compiler.Fixes #1738.
alexcrichton submitted PR Review.
alexcrichton merged PR #1739.
Last updated: Dec 23 2024 at 12:05 UTC