Skip to content

Weirdness likely memory access #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
karlglazebrook opened this issue Jan 5, 2024 · 1 comment
Open

Weirdness likely memory access #13

karlglazebrook opened this issue Jan 5, 2024 · 1 comment

Comments

@karlglazebrook
Copy link
Member

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.

@karlglazebrook
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant