In-depth lesson · Memory corruption
Typical fixes
Every point the Memory corruption reports back under this heading, best-backed first, each with the reports it is seen in.
-
Do not use a freed string in log messages; copy it before freeing.
Seen in 1 report
-
Do not use a string length call on data that is not guaranteed to be null-terminated.
Seen in 1 report
-
Emit a nil-pointer check when accessing fields through embedded pointers.
Seen in 1 report
-
Enable secure coding and use a class allowlist when decoding archived objects.
Seen in 1 report
-
End an active pixel local storage session on resource-resizing entry points.
Seen in 1 report
-
Enforce that an imported tag signature is not a subtype of the defined tag signature so type invariance holds.
Seen in 1 report
-
Enforce that read ranges were previously written.
Seen in 1 report
-
Enforce that the element data section has as many entries as the element section.
Seen in 1 report
-
Enforce the extension count bound at runtime rather than only in a debug assertion.
Seen in 1 report
-
Enforce the maximum string length in Adopt so the length-addition invariant holds.
Seen in 1 report
-
Ensure Azure Stack sanitises user inputs so buffer lengths are checked before copying.
Seen in 1 report
-
Ensure release builds actually enable ASLR and DEP through the compiler and linker flags.
Seen in 1 report
-
Ensure the arena pool is freed only once in the certificate email address extraction path.
-
Ensure the binding restore actually runs on all platforms before the temporary framebuffer is deleted.
Seen in 1 report
-
Ensure the channel array is allocated with sufficient size before writing to it.
Seen in 1 report
-
Ensure the error path does not free the same transmit buffer twice.
Seen in 1 report
-
Ensure the filter observer does not outlive the element it references.
Seen in 1 report
-
Escape non-printable bytes when printing server-supplied filenames to the terminal.
Seen in 1 report
-
Exception setting should verify that the object it is given is actually an exception type.
Seen in 1 report
-
Extend the argument stack before writing the result.
Seen in 1 report
-
Fetch update and finder information over an authenticated encrypted channel.
Seen in 1 report
-
Filter reserved sentinel hash values before inserting keys into a traced map.
Seen in 1 report
-
Fix the DXC scalarisation pass so an erased instruction is not referenced again during the same transformation.
Seen in 1 report
-
$10,000 High
-
-
Fix the invalid shape pointer used when tracing a baseline JIT stub during garbage collection.
Seen in 1 report
-
Fix the lifetime issue between the WebGPU implementation and the D3D12 library.
Seen in 1 report
-
Fix the memory corruption in the property access path reached under memory pressure.
Seen in 1 report
-
Fix the processor's handling of the vector register clearing instruction during speculative execution.
-
Fixed in version 0.9.13.
-
Force small-integer tagging or emit the write barrier when storing into a small-integer field.
Seen in 1 report
-
Free arena-allocated items with the matching arena deallocator on the error path.
Seen in 1 report
-
Free saved IP options only after a grace period so other CPUs cannot still be reading them.
Seen in 1 report
-
Fully clear or invalidate the session structure during teardown so later packets cannot dereference released memory.
Seen in 1 report
-
Fully mitigate the stack buffer overflow server-side so no customer action is needed.
Seen in 1 report
-
Give the response code clear ownership so a repeating callback cannot hold a raw pointer to freed memory.
Seen in 1 report
-
Grow the buffer to fit the requested level rather than by a fixed increment.
Seen in 1 report
-
Guard against a handle being removed from a nested socket callback while the pollset is being walked.
-
Guard against recursive invocation of the hash default block.
Seen in 1 report
-
Guard the integer addition when accumulating custom clipboard data length.
Seen in 1 report
-
Guard the object with a weak pointer across the nested message loop.
Seen in 1 report
-
Guard the pointer addition against integer overflow before the bounds comparison.
Seen in 1 report
-
Handle a failed reallocation before using the attribute array.
-
Handle a percent sign at the end of a string without reading past the terminator.
Seen in 1 report
-
Handle a trailing percent sign in the format string without skipping the null terminator.
-
Handle the data tag of a transferred object so the alloc or mapped tag invariant holds.
-
Handle the empty CDATA case so the length calculation cannot underflow.
Seen in 1 report
-
Handle the null case in stream context defaults.
Seen in 1 report
-
Hold an owning reference to the frame selection for the lifetime of the scroll event.
Seen in 1 report
-
Hold refcounted references to FontFace objects in the local array so user JavaScript cannot free them mid-iteration.
Seen in 1 report
-
Hold the sink lock in the device switch callback.
Seen in 1 report
-
Implement real reference counting instead of stubbing AddRef and Release.
Seen in 1 report