[Gambas-bugtracker] Bug #2729: Writing whole structure on Debian and OpenSUSE Cause segfault
    bugtracker at gambaswiki.org 
    bugtracker at gambaswiki.org
       
    Fri Mar 24 20:51:17 CET 2023
    
    
  
http://gambaswiki.org/bugtracker/edit?object=BUG.2729&from=L21haW4-
Comment #3 by Benoît MINISINI:
There are two problems:
Alloc() returns uninitialized memory, so it's a very bad idea to access it via a structure.
It can lead to memory corruption, as the structure management code assumes that the structure data is always valid.
Anyway, even when using memory fully initialized with zeros, it still crashes.
It does not crash when the interpreter is compiled without optimization. It's apparently a bug in compiler optimization, or the way I'm writing the code that make gcc optimizer do bad assumptions.
Benoît MINISINI changed the state of the bug to: Working.
    
    
More information about the Bugtracker
mailing list