GMT 6.1.1 API crash when executing legend module

  • First, I fixed it–the pslegend.c source code checks for memory allocation incorrectly.
  • Second, because of institutional restrictions, I cannot use a newer version than what compiles on RHEL8 Linux. If the problem is fixed in a newer version, all well and good.
  • Third: the actual symptoms were a segmentation fault inside legend every time I used ‘P’ to set paragraph parameters before ‘T’ lines, and then later just tried to execute ‘T’ lines using the defaults (i.e., did not set a ‘P’ line).
  • So, should I submit a patch for the 6.1.1 version to the GMT GitHub, or is that too far in the past to care about? The LGPL says I have to make modifications available, and this is my only way of doing that.

No. You should first post an example in the forum showing the problem you have and say you can’t test it on 6.4 because … (though I can’t see what prevents you to build GMT in your local area account)

Not exactly. What those licenses say is that you must do it if you redistribute the program. With your local copy and for our own use you can do what you want.

We do not have resources to fix old GMT versions so the best scenario is if you can check the current version locally to determine if you patch is relevant of if we already fixed that problem. I do remember messing with memory stuff in legend but it is a while a go.

@CHigginbotham maybe you can post a crashing example so someone (perhaps me) can test it on a current version of GMT?