[torquedev] [Bug 98] Allocation of incorrect pointer in src/scheduler.cc/samples/fifo/job_info.c: update_job_comment causes random crash.

bugzilla-daemon at supercluster.org bugzilla-daemon at supercluster.org
Wed Nov 10 02:32:03 MST 2010


--- Comment #8 from Simon Toth <SimonT at mail.muni.cz> 2010-11-10 02:32:03 MST ---
(In reply to comment #6)
> Actually, thinking about it.. when would the string created by strdup() ever be
> freed? The answer is, it wouldn't. There will be a memory leak.
> So, after the call to pbs_alterjob() should the pointer be free()ed?
> If a structure within the pbs job info storage is merely using a reference to
> the passed memory then this could cause further problems later, if not then
> it's not a problem.

There are only two options. pbs_alterjob requires a heap allocated pointer that
is freed inside pbs_alterjob, or it takes a string constant. I think that it
takes a string constant.

Configure bugmail: http://www.clusterresources.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the torquedev mailing list