oetiker / rrdtool-1.x

RRDtool 1.x - Round Robin Database
http://www.rrdtool.org
GNU General Public License v2.0
1.02k stars 264 forks source link

rrdtool v 1.8.0 - Segmentation fault on start (Alpine Linux) #1241

Closed goricz closed 11 months ago

goricz commented 11 months ago

Describe the bug

# rrdtool 
RRDtool 1.8.0  Copyright by Tobias Oetiker <tobi@oetiker.ch>
Segmentation fault (core dumped)

Older version 1.7.2 is running well

see https://gitlab.alpinelinux.org/alpine/aports/-/issues/15416

To Reproduce Steps to reproduce the behavior:

  1. install rrdtool v. 1.8.0 in Alpine Linux
  2. run rrdtool

Desktop (please complete the following information):

Additional context It's failing because of this commit: https://github.com/oetiker/rrdtool-1.x/commit/6040d8f

If BUILD_DATE is defined, there is the last parameter missing in fprintf()

#ifdef BUILD_DATE
    fprintf(stdout, _(help_main), PACKAGE_VERSION, BUILD_DATE);
#else
    fprintf(stdout, _(help_main), PACKAGE_VERSION, __DATE__, __TIME__);
#endif

I've tried to compile with empty string in place of last parameter: fprintf(stdout, _(help_main), PACKAGE_VERSION, BUILD_DATE, "");

and it worked well

c72578 commented 11 months ago

Please see:

1165

Commit: https://github.com/oetiker/rrdtool-1.x/commit/e59f703bbcc0af949ee365206426b6394c340c6f

Patch: https://github.com/oetiker/rrdtool-1.x/commit/e59f703bbcc0af949ee365206426b6394c340c6f.patch

goricz commented 11 months ago

Thanks, I didn't notice that patch. I'll include it in rrdtool APKBUILD.