ldc icon indicating copy to clipboard operation
ldc copied to clipboard

hunt.util.DateTime: program fail at start with ldc 1.32 (ldc 1.30 was fine)

Open mw66 opened this issue 2 years ago • 2 comments
trafficstars

https://github.com/huntlabs/hunt/issues/98

The failure is at:

https://github.com/huntlabs/hunt/blob/master/source/hunt/util/DateTime.d#L430

mw66 avatar Apr 02 '23 18:04 mw66

What's the failure? We need some more info to fix this. (a reproducing testcase would be best)

JohanEngelen avatar Apr 02 '23 19:04 JohanEngelen

The issue I reported is hard to isolate, but I think I only imported hunt.util.DateTime, and didn't even use it. The failure is in its shared static this() {} block.

But here is a related issue, which is very easy to reproduce:

https://github.com/huntlabs/hunt/tree/master/examples/timer

This example also "import hunt.util.DateTime;"

examples/timer Segmentation fault with ldc 1.30 and 1.32 (working fine with DMD64 D Compiler v2.100.2)

Linux x86_64:

just goto that dir, and do dub build (switch dub from ldc 1.30, 1.32, or dmd), and run ./timer

Thread 1 "timer" received signal SIGSEGV, Segmentation fault.
_D4hunt4util5TimerQg6onReadMFZ9__lambda2MFC6ObjectZv (obj=0x7ffff7ef00c0) at ../../source/hunt/util/Timer.d:51
51                          if (ticked !is null)
(gdb) where
#0  _D4hunt4util5TimerQg6onReadMFZ9__lambda2MFC6ObjectZv (obj=0x7ffff7ef00c0) at ../../source/hunt/util/Timer.d:51
#1  0x0000555555634164 in hunt.event.timer.Epoll.AbstractTimer.readTimer(scope void(Object) delegate) (this=0x7ffff7ef2100, read=...)
    at ../../source/hunt/event/timer/Epoll.d:71
#2  0x000055555562be01 in _D4hunt4util5TimerQg6onReadMFZv (this=0x7ffff7ef2100) at ../../source/hunt/util/Timer.d:46
#3  0x0000555555595b14 in _D4hunt5event8selector5Epoll16AbstractSelector17handeChannelEventMFCQCo2io7channel15AbstractChannelQrkZv (this=0x7ffff6200000, 
    channel=0x7ffff7ef2100, event=1) at ../../source/hunt/event/selector/Epoll.d:219
#4  0x0000555555595894 in hunt.event.selector.Epoll.AbstractSelector.doSelect(long) (this=0x7ffff6200000, timeout=100)
    at ../../source/hunt/event/selector/Epoll.d:173
#5  0x00005555555963a9 in _D4hunt5event8selector8SelectorQj6onLoopMFlZv (this=0x7ffff6200000, timeout=100) at ../../source/hunt/event/selector/Selector.d:195
#6  0x0000555555596195 in _D4hunt5event8selector8SelectorQj5doRunMFDFZvZv (this=0x7ffff6200000, handler=...) at ../../source/hunt/event/selector/Selector.d:155
#7  0x000055555559600c in _D4hunt5event8selector8SelectorQj3runMFlZv (this=0x7ffff6200000, timeout=100) at ../../source/hunt/event/selector/Selector.d:103
#8  0x00005555555927b7 in D main () at source/app.d:105

mw66 avatar Apr 02 '23 20:04 mw66