Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
41 user(s) are online (25 user(s) are browsing Forums)

Members: 1
Guests: 40

billyfish, more...

Support us!

Headlines

Report message:*
 

Re: Memory protection and tasks/processes

Subject: Re: Memory protection and tasks/processes
by afxgroup on 2021/3/2 8:57:59

@LiveForIt

Yes, NULL is after the free. This doesn't change the sense of the question. for example this piece of code in clib2:

__delete_semaphore(dirent_lock);
    
dirent_lock NULL;


where __delete_semaphore is a simply:

if (dirent_lock != NULL)
        
ReleaseSemaphore(dirent_lock);


is crashing in the kernel with a DSI and freeze the entire OS. Is this normal? Keep in mind that some software for other platforms (in the specific VLC), when use free() will not check neither if the pointer is null or not. Yes. is a bad pratice but in the case that pointer is null the OS will not be erased with it.

Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project