Weirdness likely memory access
Opened this issue · 1 comments
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
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:
- the code in PGPLOT.xs for pglcurs() explicitly checks and coerces the array to size
- 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.
Adding that if I compile everything with GCC (including Perl itself) I can make this go away. I expect this may be general Apple CC->Fortran calling weirdness.