Skip to content
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

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

Open
mw66 opened this issue Apr 2, 2023 · 2 comments
Open

Comments

@mw66
Copy link

mw66 commented Apr 2, 2023

huntlabs/hunt#98

The failure is at:

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

@JohanEngelen
Copy link
Member

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

@mw66
Copy link
Author

mw66 commented Apr 2, 2023

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

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

2 participants