You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following program is supposed to read a gigabyte from /dev/zero and one second after reading it, checking that all bytes are 0 that come back. Pretty useless program but bear with me 🙂.
Nothing happens, program just runs, prints nothing and never exits
Actual
On macOS the expected behaviour is exhibited. On Linux however (tested with 3.0.1 release, 3.0.2 release and Swift version 3.1-dev (LLVM c3e057b06a, Clang 0540ceb7ad, Swift d3857f6071)), I get two different crashes
h3 Crash 1
it's faulting at address 0x68 which is clearly a NULL pointer
this one is also interesting as one of the bytes wasn't 0 but 64. This leads me to think that the DispatchData is probably already released and still more or less intact in memory. Therefore the pointer to the actual bytes is also still valid(ish) but is dangling and points to a random place in memory where there happens to be a byte with value 64.
The text was updated successfully, but these errors were encountered:
Attachment: Download
Additional Detail from JIRA
md5: 2e06178945d3f56e3269faeaa6f8a4b4
Issue Description:
Description
The following program is supposed to read a gigabyte from
/dev/zero
and one second after reading it, checking that all bytes are0
that come back. Pretty useless program but bear with me 🙂.Expected
Nothing happens, program just runs, prints nothing and never exits
Actual
On macOS the expected behaviour is exhibited. On Linux however (tested with 3.0.1 release, 3.0.2 release and
Swift version 3.1-dev (LLVM c3e057b06a, Clang 0540ceb7ad, Swift d3857f6071)
), I get two different crashesh3 Crash 1
it's faulting at address
0x68
which is clearly a NULL pointerbacktraces for all threads
Crash 2
this one is also interesting as one of the bytes wasn't
0
but64
. This leads me to think that theDispatchData
is probably already released and still more or less intact in memory. Therefore the pointer to the actual bytes is also still valid(ish) but is dangling and points to a random place in memory where there happens to be a byte with value64
.The text was updated successfully, but these errors were encountered: