Memory management in Julia

235 views
Skip to first unread message

Madeleine Udell

unread,
Feb 1, 2016, 1:39:38 PM2/1/16
to julia-users, Nandana Sengupta
Hi all,

I'm running into some memory management issues: in particular, a malloc error that claims I am modifying an object after freeing it: see this question. The error is, 

julia(9849,0x7fff705d0300) malloc: *** error for object 0x7f96a332f408: incorrect checksum for freed object - object was probably modified after being freed. *** set a breakpoint in malloc_error_break to debug

I'm not sure how to debug it: what's the best way to search for code that might be modifying an object after freeing it in Julia? (For example, I don't know what or where malloc_error_break is.)

Thanks!
Madeleine

Yichao Yu

unread,
Feb 1, 2016, 1:52:11 PM2/1/16
to Julia Users, Nandana Sengupta
Which platform is this and how repeatable is it?

>
> Thanks!
> Madeleine

Madeleine Udell

unread,
Feb 1, 2016, 1:55:25 PM2/1/16
to julia-users, Nandana Sengupta
This is on a mac; we've got a variety of function calls giving errors, some with probability ~.5 and some every time we've run them.
--
Madeleine Udell
Postdoctoral Fellow at the Center for the Mathematics of Information
California Institute of Technology

Matt Bauman

unread,
Feb 1, 2016, 2:10:29 PM2/1/16
to julia-users, nanda...@gmail.com
Can you reproduce it if you run julia with the --check-bounds=yes command line argument?

Madeleine Udell

unread,
Feb 1, 2016, 8:21:15 PM2/1/16
to julia-users

Fantastic! That helped me track down the problem and it's working now.

Reply all
Reply to author
Forward
0 new messages