PyTorch heap issues in MKLDNN zero and weights-only load
Two opening PyTorch reports describe CPU memory-safety problems in tensor initialization and deserialization. Both are single-message issues, not yet confirmed fixes, and both concern heap contents that callers may not expect to touch.
MKLDNN zero_() overflows on half-width CPU tensors
An initial PyTorch issue reports that MKLDNN zero_() writes float32-sized elements when applied to bfloat16 and float16 tensors, causing a heap buffer overflow. The report is limited to the CPU MKLDNN path. Developers using those dtypes with MKLDNN should treat the call as unsafe until the project confirms a fix, because the overflow is a memory-safety bug rather than a wrong numeric result.
weights_only torch.load can expose uninitialized heap
A separate opening report claims that torch.load with weights_only=True can return a tensor backed by uninitialized process heap memory through allowed TypedStorage construction. The weights_only flag is meant to restrict what a checkpoint can reconstruct. If the claim holds, a load that looks restricted can still surface leftover heap contents.