[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] possible bug in sys_s_lbclose



On Sun, 2010-12-19 at 16:15 +0100, Helmut Karlowski wrote:
> Hello,
> 
> When closing an slb-process, the flag P_FLAG_SLB is reset before  
> terminating the slb.
> 
> When free_ext is called by terminate, the parent may not be knowing if all  
> data is malloced. In XaAES this may cause a duplicate free because the  
> slb-ext-data (which may contain pointers to malloced data) is copied from  
> its caller. This second free causes a system-HALT.
> 
> I'd like to have an additional flag in p_flag for the slb-process to  
> inform XaAES to not call free in this case.
> 
> Would this be possible, or is there a better way?

I wouldn't like adding an additional flag just to indicate a free
status.

Wouldn't re-ordering things be possible for P_FLAG_SLB ?

Alan.