< 1765929666 609909 :int-e!~noone@int-e.eu PRIVMSG #esolangs :(the corresponding code is no longer in ghc's head, beautiful) < 1765930098 111655 :int-e!~noone@int-e.eu PRIVMSG #esolangs :Anyway. To call back into Haskell from C, the RTS creates a trampoline, and wraps the pointer to it into some heap object with a finalizer that is supposed to free the trampoline; that's freeHaskellFunctionPtr. As a plausibility check, that verifies that the first few bytes of the code match the generated trampolines. This check is failing. < 1765930104 367824 :int-e!~noone@int-e.eu PRIVMSG #esolangs :Smells like memory corruption? < 1765930397 407799 :int-e!~noone@int-e.eu PRIVMSG #esolangs :Let me find a link: https://github.com/ghc/ghc/blob/eeead9fc9bdb5e1add09a9c3aa40df9a77d9eac3/rts/adjustor/NativeAmd64.c#L327-L351 < 1765930398 299976 :fizzie!~irc@selene.zem.fi PRIVMSG #esolangs :I guess it's borderline possible some library it links dynamically to has made some sort of non-ABI-compatible change. < 1765930443 838214 :int-e!~noone@int-e.eu PRIVMSG #esolangs :(not that it will help much) < 1765930446 860647 :fizzie!~irc@selene.zem.fi PRIVMSG #esolangs :(Judging from the file name, this was built with ghc-8.8.4, which was a while ago.) > 1765930492 467409 PRIVMSG #esolangs :14[[07User:Hotcrystal0/Signature14]]4 10 02https://esolangs.org/w/index.php?diff=170758&oldid=170649 5* 03Hotcrystal0 5* (+201) 10 < 1765930531 237264 :int-e!~noone@int-e.eu PRIVMSG #esolangs :./burlesque +RTS --info might tell you < 1765930548 76860 :int-e!~noone@int-e.eu PRIVMSG #esolangs :(or whatever the name is) < 1765930560 721727 :fizzie!~irc@selene.zem.fi PRIVMSG #esolangs :,("GHC version", "8.8.4") < 1765930562 205240 :fizzie!~irc@selene.zem.fi PRIVMSG #esolangs :(blsq) < 1765930675 66595 :int-e!~noone@int-e.eu PRIVMSG #esolangs :if you want to try rebuilding it you might find https://int-e.eu/~bf3/tmp/blsq.patch helpful < 1765930698 211259 :int-e!~noone@int-e.eu PRIVMSG #esolangs :(because manually chasing dependencies is a pain) < 1765930712 385989 :b_jonas!~x@catv-80-98-84-202.catv.fixed.one.hu PRIVMSG #esolangs :memory corruption in glue code to expose a closure as a C function pointer without extra arguments? how jolly < 1765930768 709803 :b_jonas!~x@catv-80-98-84-202.catv.fixed.one.hu PRIVMSG #esolangs :does the haskell FFI have a way to avoid this, by exposing closures as an explicit pair so the caller passes an argument and you can avoid the trampoline? < 1765930872 595650 :sorear!sid184231@id-184231.uxbridge.irccloud.com PRIVMSG #esolangs :Note that the value printed is supposed to be a *page* pointer, the fact that it doesn't end with 000 seems to indicate the pointer itself is corrupt < 1765930889 40642 :b_jonas!~x@catv-80-98-84-202.catv.fixed.one.hu PRIVMSG #esolangs :oh that's much better < 1765930920 621890 :fizzie!~irc@selene.zem.fi PRIVMSG #esolangs :int-e: Thanks! Looks like I'd actually made https://0x0.st/onqe.cabal back when originally building it for myself in the "I don't know what I'm doing but it made it build" way. Will have to give rebuilding it a try when I get back to it. < 1765931034 177294 :sorear!sid184231@id-184231.uxbridge.irccloud.com PRIVMSG #esolangs :breakpoint on errorBelch and try to get a backtrace, maybe < 1765931058 869614 :int-e!~noone@int-e.eu PRIVMSG #esolangs :hope it works in `rr` so you can easily find the places that last modified it < 1765931119 109493 :int-e!~noone@int-e.eu PRIVMSG #esolangs :fizzie: Hah, you actually picked a meaningful version. < 1765931141 531920 :fizzie!~irc@selene.zem.fi PRIVMSG #esolangs :Can't right now, but just in case y'all want to keep on guessing, here's another observation: the pointer value it prints keeps steadily decreasing, every time by 40 bytes: https://0x0.st/Prvv.txt < 1765931147 792289 :sorear!sid184231@id-184231.uxbridge.irccloud.com PRIVMSG #esolangs :the offending value is a register, not memory, rr might help if the backtrace shows it was loaded from memory < 1765931170 71972 :int-e!~noone@int-e.eu PRIVMSG #esolangs :sorear: it dereferences that pointer, no? < 1765931187 40452 :int-e!~noone@int-e.eu PRIVMSG #esolangs :yeah it does < 1765931204 466061 :int-e!~noone@int-e.eu PRIVMSG #esolangs :sorear: but right since you're saying that the pointer itself is corrupted < 1765931281 175720 :sorear!sid184231@id-184231.uxbridge.irccloud.com PRIVMSG #esolangs :7ff... looks like a pointer into the stack, trying to free a local variable instead of what it points to while recursing with 40 byte frames? < 1765931381 469820 :fizzie!~irc@selene.zem.fi PRIVMSG #esolangs :0x7ff24f42cfa8 (it's ASLR, so it's a new one) is in the mapping 7ff24f42c000-7ff24f42d000 r-xp 0000a000 00:1c 231402 /usr/lib/x86_64-linux-gnu/libffi.so.8.2.0 < 1765931416 309670 :fizzie!~irc@selene.zem.fi PRIVMSG #esolangs :So not stack but code (r-xp) of a dynamically loaded library. < 1765931469 18440 :int-e!~noone@int-e.eu PRIVMSG #esolangs :Uh... why would this code be used if it's using libffi? < 1765931538 573583 :fizzie!~irc@selene.zem.fi PRIVMSG #esolangs :Dunno, but I do seem to have recently updated the libffi package on this system, so I imagine that's the immediate trigger for it now misbehaving. < 1765931540 659275 :sorear!sid184231@id-184231.uxbridge.irccloud.com PRIVMSG #esolangs :probably something in the dependencies is messed up so it's trying to use and not use libffi simultaneously < 1765931573 396226 :int-e!~noone@int-e.eu PRIVMSG #esolangs :Or maybe it used to get lucky and libffi trampolines looked that way, and now that stopped being the case? < 1765931630 215980 :fizzie!~irc@selene.zem.fi PRIVMSG #esolangs :(The changelog for the new version also mentions what changed was "Stop building with --disable-exec-static-tramp", which sounds quite trampoliney.) < 1765931649 568359 :int-e!~noone@int-e.eu PRIVMSG #esolangs :It's also funny that `grep -r ' guv'` finds *only* these adjustor related errors. < 1765931660 777976 :sorear!sid184231@id-184231.uxbridge.irccloud.com PRIVMSG #esolangs :ghc or libffi changelog? < 1765931712 119345 :fizzie!~irc@selene.zem.fi PRIVMSG #esolangs :The libffi one. < 1765931780 336445 :fizzie!~irc@selene.zem.fi PRIVMSG #esolangs :(I haven't rebuilt the binary since 2020, and I don't _think_ any GHC runtime stuff gets linked to it dynamically, at least looking at ldd output.) < 1765931895 679018 :int-e!~noone@int-e.eu PRIVMSG #esolangs :IIUC this is the code that is supposed to be used when libffi is used for trampolines: https://github.com/ghc/ghc/blob/ghc-8.8/rts/Adjustor.c#L97-L111 ...note the absence of calling people 'guv'. < 1765931929 338031 :int-e!~noone@int-e.eu PRIVMSG #esolangs :I wanted https://github.com/ghc/ghc/blob/ghc-8.8.4-release/rts/Adjustor.c#L97-L111 (the release tag, not the branch) but the code is the same. < 1765931951 846412 :fizzie!~irc@selene.zem.fi PRIVMSG #esolangs :(UK, Ireland, chiefly London, informal) A form of address to a man, usually a stranger or a superior. < 1765932012 904965 :fizzie!~irc@selene.zem.fi PRIVMSG #esolangs :guv'nor: (UK, Ireland) An informal form of address to a man; see guv. This version is especially likely to be applied to the owner of a business or the landlord of a public house. < 1765932018 284102 :fizzie!~irc@selene.zem.fi PRIVMSG #esolangs :Such a culture. < 1765932031 464572 :int-e!~noone@int-e.eu PRIVMSG #esolangs :Anyway. I don't have the whole story for this. There may be a hybrid scenario where libffi is used for some things and not for others. < 1765932051 763570 :fizzie!~irc@selene.zem.fi PRIVMSG #esolangs :Just to be clear, none of you need to continue thinking about this if you don't want to. :) < 1765932056 909209 :int-e!~noone@int-e.eu PRIVMSG #esolangs :And a bug that causes that old GHC runtime to confuse them. < 1765932065 243666 :sorear!sid184231@id-184231.uxbridge.irccloud.com PRIVMSG #esolangs :libffi static trampolines are 40 bytes on x86_64 without ENDBR so that's probably related < 1765932078 356337 :int-e!~noone@int-e.eu PRIVMSG #esolangs :fizzie: I am about done. :) < 1765932140 439677 :int-e!~noone@int-e.eu PRIVMSG #esolangs :fizzie: Because while it's fun to dig, there's little point in actually debugging a 5+ year old GHC version < 1765932147 85350 :int-e!~noone@int-e.eu PRIVMSG #esolangs :(and its RTS) < 1765932187 24753 :int-e!~noone@int-e.eu PRIVMSG #esolangs :I will say that libffi changing what its trampolines look like sounds more palatable than manifesting a sudden memory corruption. < 1765932325 959616 :int-e!~noone@int-e.eu PRIVMSG #esolangs :b_jonas: Anyway, no I don't believe that there's a fat pointer alternative to those trampolines. < 1765932542 99061 :int-e!~noone@int-e.eu PRIVMSG #esolangs :fizzie: actually debugging would involve fun side quests like figuring out whether the ghc was a vanilla one or somehow patched by a distributor :) < 1765932797 663943 :int-e!~noone@int-e.eu PRIVMSG #esolangs :fizzie: FWIW the GHC version I used to build Burlesque recently is 9.10.3. So a slight bit behind. (But also way ahead of, say, Debian) < 1765932845 843142 :int-e!~noone@int-e.eu PRIVMSG #esolangs :I don't know whether 9.12 would break; I simply didn't try. < 1765934566 408209 :pool9!~nathan@user/PoolloverNathan JOIN #esolangs PoolloverNathan :nathan < 1765934632 165700 :pool9!~nathan@user/PoolloverNathan QUIT :Read error: Connection reset by peer < 1765934635 211234 :pool!~nathan@user/PoolloverNathan QUIT :Ping timeout: 240 seconds < 1765934768 982192 :pool!~nathan@user/PoolloverNathan JOIN #esolangs PoolloverNathan :nathan < 1765935242 72805 :amby!~ambylastn@host-92-17-35-221.as13285.net QUIT :Quit: so long suckers! i rev up my motorcylce and create a huge cloud of smoke. when the cloud dissipates im lying completely dead on the pavement < 1765936001 931367 :b_jonas!~x@catv-80-98-84-202.catv.fixed.one.hu PRIVMSG #esolangs :hmm < 1765936749 711721 :pool!~nathan@user/PoolloverNathan QUIT :Read error: Connection reset by peer < 1765936774 330340 :pool!~nathan@user/PoolloverNathan JOIN #esolangs PoolloverNathan :nathan > 1765944491 260530 PRIVMSG #esolangs :14[[07Ruler function14]]4 10 02https://esolangs.org/w/index.php?diff=170759&oldid=170752 5* 03PkmnQ 5* (+158) 10/* Implementations */ > 1765945990 796981 PRIVMSG #esolangs :14[[07Special:Log/newusers14]]4 create10 02 5* 03Mikacat29 5* 10New user account < 1765948058 457215 :slavfox!~slavfox@193.28.84.32 QUIT :Quit: ZNC 1.8.2 - https://znc.in < 1765948246 624797 :slavfox!~slavfox@193.28.84.32 JOIN #esolangs slavfox :slavfox < 1765948392 874627 :sprout!~sprout@84-80-106-227.fixed.kpn.net QUIT :Ping timeout: 256 seconds < 1765948494 234917 :sprout!~sprout@84-80-106-227.fixed.kpn.net JOIN #esolangs sprout :sprout > 1765949762 773786 PRIVMSG #esolangs :14[[07EsoFmt14]]4 M10 02https://esolangs.org/w/index.php?diff=170760&oldid=140905 5* 03None1 5* (-2) 10/* Tags */ > 1765951852 659112 PRIVMSG #esolangs :14[[07Special:Log/delete14]]4 delete10 02 5* 03Ais523 5* 10deleted "[[02Template:Stub-210]]": unnecessary template (we already have a stub template, and having just one template instead of two helps to keep a consistent style) < 1765952169 128257 :APic!apic@apic.name PRIVMSG #esolangs :Hi < 1765952296 982442 :korvo!~korvo@2604:a880:4:1d0::4d6:d000 PRIVMSG #esolangs :Good evening.