Page MenuHome

Fix T81340: UBSan: member access within MemHead
AbandonedPublic

Authored by Ankit Meel (ankitm) on Oct 1 2020, 1:22 AM.

Details

Summary

Similar to rBc1cdde04e270: Fix T81100: ccl::Node: ASan SEGV due to bad pointer. Avoid creating invalid addresses for
accessing members' offsets (or size, type etc).

The warning:
mallocn_guarded_impl.c:1001:7: runtime error: member access within
null pointer of type 'MemHead (aka 'struct MemHead')

Fix T81340 (partially)

Diff Detail

Repository
rB Blender
Branch
ubmemhead (branched from master)
Build Status
Buildable 10502
Build 10502: arc lint + arc unit

Event Timeline

Ankit Meel (ankitm) requested review of this revision.Oct 1 2020, 1:22 AM
intern/guardedalloc/intern/mallocn_guarded_impl.c
157

Applied, kept ((char *)x) to avoid any ambiguity from order of operations.

This revision is now accepted and ready to land.Oct 1 2020, 7:07 AM