Skip to content

Weirdness likely memory access #13

@karlglazebrook

Description

@karlglazebrook

This may not even be an issue with this this repo, I think it is more likely to be some weird memory leak in perl or gfortran

So I got this weird new output from the test t2.t when running on an Intel MacBook Pro (gcc/gfortran 11.2 perl 5.38.2) on macOS Monterey

weird

Note the extra blue lines. I can make them go away if I make the following trivial change:

--- t2.t	2021-02-16 13:02:49.000000000 +1100
+++ t2-fix.t	2024-01-05 15:31:29.000000000 +1100
@@ -65,6 +65,7 @@
    PGPLOT::pgsci(4);
    diag "Enter some points with the cursor, press 'x' when done\n";
    our (@xt, @yt);
+   @xt=(1); @yt=(1);
    PGPLOT::pglcur(5, (my $n = 0),\@xt,\@yt);
    PGPLOT::pgsci(9);
    PGPLOT::pgpoint($n,*xt,*yt,20);

Which puts values in to the array before pglcurs() is called. This really should have no effect. Also adding a print @xt; also fixes it.

I think this can not be a PGPLOT bug because:

  1. the code in PGPLOT.xs for pglcurs() explicitly checks and coerces the array to size
  2. Its worked everywhere else for the past 20+ years

But I thought I would mention it here in case anyone else had seen it or had any ideas what this might be.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions