lout-users
[Top][All Lists]
Advanced

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

Re: Problem using llx/urx in PS_LinkDest


From: KHMan
Subject: Re: Problem using llx/urx in PS_LinkDest
Date: Fri, 02 May 2008 18:56:52 +0800
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4

KHMan wrote:
> Jeff Kingston wrote:
>>> someone might have a good idea what went wrong
>> I'll look at it if you get completely stuck, but it's
>> been a long time and you are probably well ahead of me.
>>
>>> Changing oux from union into struct makes the
>>> problem go away
>> Well, that suggests that some idiot has put two fields
>> into a union and used them both.  I'd be tracking down
>> all uses of the other fields of that union.  If that
>> is the problem, let me know - I had better be the one
>> to decide how to change the data layout.
> 
> Okay, I've got a candidate bug.
> 
> There is a memory allocation problem in that some new objects
> aren't all zeroed out. Here is an example for the /LOUTyunit link
> destination in the expert's guide document, based on my own trace
> printouts.

A brief update. I just checked externs.h:

PutMem() does not have a memset() to zero the memory area, so when
objects get reused by GetMem(), anything that relies on zeroed
values will bork.

Objects are clean at first because of calloc(), but since
save_mark() is not initialized properly, LINK_DEST and
LINK_DEST_NULL objects borks if the new object has a non-zero
value for save_mark().

This bug may entail an audit of any other objects that rely on
zeroed memory for new objects, so I will leave the fixing to more
experienced hands.

> [snip snip]
> So the memory allocation routines needs looking into, I think.
> 
> As for link destination targeting, I plan to write a few proper
> tests to make sure scale/rotate/mirror/etc. works, but for testing
> purposes, the current version (needs z49 changes only) is attached.

-- 
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia



reply via email to

[Prev in Thread] Current Thread [Next in Thread]