To reproduce this in cronolog:

echo hello | cronolog --symlink=/tmp/foo /tmp/foo.%Y%m%d-%H%M%S.log

This will create a new log every second (effectively each time the
command is run). The correct behavior is that the /tmp/foo symlink
should move to the new log file. In the broken case, the link does not
move due to the if statement of "prevlinkname" returning true when it
should be false [1]. If you test the value of "prevlinkname" for NULL
before and after the stat(prevlinkname...) call at L250 (similar to my
testcase.c), the pointer is no longer null after the call to stat().

[1]
https://github.com/fordmason/cronolog/blob/master/src/cronoutils.c#L256

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1770676

Title:
  gcc optimizer bug

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-5/+bug/1770676/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to