mirror of
https://github.com/nzp-team/fteqw.git
synced 2025-02-01 05:00:46 +00:00
clarified error message. also testing moodles' buildbot's email feature. mwahaha.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4123 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
4cc1341b22
commit
fc2ab857f5
1 changed files with 9 additions and 2 deletions
|
@ -288,7 +288,14 @@ static void PR_memfree (progfuncs_t *progfuncs, void *memptr)
|
|||
// PR_memvalidate(progfuncs);
|
||||
if (ptr < sizeof(qcmemusedblock_t) || ptr >= prinst->addressableused)
|
||||
{
|
||||
printf("PF_memfree: pointer invalid - out of range (%u >= %u)\n", ptr, prinst->addressableused);
|
||||
if (ptr < sizeof(qcmemusedblock_t) && !*(char*)memptr)
|
||||
{
|
||||
//the empty string is a point of contention. while we can detect it from fteqcc, its best to not give any special favours (other than nicer debugging, where possible)
|
||||
//we might not actually spot it from other qccs, so warning about it where possible is probably a very good thing.
|
||||
printf("PF_memfree: unable to free the non-null empty string constant\n", ptr, prinst->addressableused);
|
||||
}
|
||||
else
|
||||
printf("PF_memfree: pointer invalid - out of range (%u >= %u)\n", ptr, prinst->addressableused);
|
||||
PR_StackTrace(progfuncs);
|
||||
return;
|
||||
}
|
||||
|
@ -298,7 +305,7 @@ static void PR_memfree (progfuncs_t *progfuncs, void *memptr)
|
|||
ptr = (char*)ub - progfuncs->stringtable;
|
||||
if (ub->marker != MARKER || ub->size <= sizeof(*ub) || ptr + ub->size > (unsigned int)prinst->addressableused)
|
||||
{
|
||||
printf("PF_memfree: memory corruption or double free\n");
|
||||
printf("PR_memfree: pointer lacks marker - double-freed?\n");
|
||||
PR_StackTrace(progfuncs);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue