Summary: null dereference with offset not memo...@safe
           Product: D
           Version: 2.038
          Platform: x86_64
        OS/Version: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Michel Fortin <> 2010-01-05 
10:11:57 EST ---
This supposedly "safe" program under Mac OS X 10.6 doesn't give any error
neither at compile time nor at runtime, yet it isn't memory-safe at all as it
corrupts some part of the memory space.

struct S {
    uint[100000] a;
    uint b;

S* s = null;

@safe void main() {
    s.b = 1;

This happen because the offset for member "b" is very far, allowing it to falls
on another memory page which happen to exists.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to