Regression testing on GCJ 3.3
Boehm, Hans
hans_boehm@hp.com
Wed May 14 19:51:00 GMT 2003
I assume that TabFolder is the SWT widget? By "garbage collection crash" you mean that something is prematurely collected? Or that it dies in the garbage collector? Do you have more details as to what goes wrong?
Where is the reference to the array of children stored? Is there native code involved, or should the array always be accessible through Java objects?
Hans
> -----Original Message-----
> From: Øyvind Harboe [mailto:oyvind.harboe@zylin.com]
> Sent: Wednesday, May 14, 2003 5:54 AM
> To: java@gcc.gnu.org
> Subject: Regression testing on GCJ 3.3
>>> I'm struggling a bit with garbage collection crashes in GCJ.
>> Could someone comment on the code below?
>> This happens under GCJ 3.2. I can't yet test in GCJ 3.3,
> because it crashes for other reasons which are being
> followed up on.
>>> In some rare configurations the following code will crash:
>>> private void packTabFolder(TabFolder tabFolder)
> {
> for (int i = 0; i < tabFolder.getChildren().length; i++)
> {
> tabFolder.getChildren()[i].pack();
> }
> tabFolder.pack();
> }
>>> I can make the crash go away by rewriting it to:
>>> private void packTabFolder(TabFolder tabFolder)
> {
> /* KLUDGE!!! if I inline "children" GCJ can pagefault on
> some machines */
> Control[] children=tabFolder.getChildren();
>> for (int i = 0; i < children.length; i++)
> {
> children[i].pack();
> }
> tabFolder.pack();
> }
>>> I *suspect* from the scant feedback I've gotten that it is not related
> to Windows XP or 98 in particular.
>>> Øyvind
>
More information about the Java
mailing list