2016-09-04T00:08:42Z oleo_ joined #sbcl 2016-09-04T00:12:42Z oleo quit (Ping timeout: 276 seconds) 2016-09-04T00:28:53Z nyef: ... why does HPPA have an end-run for handling pending-interrupt traps that clears PAI? 2016-09-04T00:29:31Z nyef: Hrm. PPC has it as well... 2016-09-04T00:29:57Z nyef: ... And MIPS... 2016-09-04T00:30:11Z nyef: ... not ALPHA, though. 2016-09-04T00:30:18Z stassats: i don't want to know 2016-09-04T00:30:23Z nyef: SPARC does... 2016-09-04T00:32:40Z npatrick04 joined #sbcl 2016-09-04T00:32:44Z nyef: This is going to be one of those bits of buried treasure from when interrupt handling was still more guesswork than anything else, isn't it? 2016-09-04T00:34:35Z nyef: Oh. It's even worse. There's two handle_trap() paths here, and only one of them has the shortcut path. 2016-09-04T00:34:57Z nyef: And the other one dumps all illegal instructions through handle_trap(). 2016-09-04T00:36:08Z stassats: the comment in mips says 2016-09-04T00:36:10Z stassats: * Genesis should provide the proper #define, but it specialcases 2016-09-04T00:36:10Z stassats: * pseudo-atomic-trap to work around some oddity on SPARC. 2016-09-04T00:36:27Z stassats: oddity in sparc, here were, in mips land 2016-09-04T00:36:30Z stassats: we are 2016-09-04T00:36:48Z stassats: or it means that it can't be encoded properly? 2016-09-04T00:36:50Z stassats: unclear 2016-09-04T00:37:07Z nyef: Too many magic numbers all over the place, too. 2016-09-04T00:38:40Z stassats: only sparc an mips have pseudo-atomic-trap 2016-09-04T00:38:55Z stassats: and only sparc actually uses it 2016-09-04T00:39:49Z stassats: i think it's supposed to be check-pending-interrupt? 2016-09-04T00:40:50Z nyef: More buried treasure. I guess I know what I'm digging through tomorrow. 2016-09-04T00:40:54Z stassats: so, apparently there is a difference between pending-interrupt-trap and pseudo-atomic-trap? 2016-09-04T00:41:01Z stassats: and what the hell is unused-trap? 2016-09-04T00:41:29Z nyef: Yes, the P-A trap is for when leaving P-A, the pending-interrupt trap is for when leaving a WITHOUT-INTERRUPTS when there's an interrupt pending. 2016-09-04T00:41:44Z sjl quit (Ping timeout: 258 seconds) 2016-09-04T00:42:16Z stassats: aren't those the same? 2016-09-04T00:42:23Z stassats: in response 2016-09-04T00:42:34Z nyef: Semi-sortof, I guess? 2016-09-04T00:43:10Z stassats: well, because arm64 uses pending-interrupt after exiting PA 2016-09-04T00:43:40Z stassats: was mips copied off from sparc? 2016-09-04T00:43:49Z nyef: But the various backends do different things for their P-A traps, while the P-I trap invariably goes through the normal handle_trap() logic... before it gets hijacked in the target-arch.c logic. 2016-09-04T00:47:56Z stassats: there is this object-not-list-trap, which appears to be from sparc 2016-09-04T00:48:06Z stassats: but also present unused in mips and x86oids 2016-09-04T00:49:23Z stassats is out to axe some code 2016-09-04T00:50:15Z stassats: there is a commit saying "Add missing definitions for object-not-list-trap, object-not-instance-trap, peudo-atomic-trap." 2016-09-04T00:50:17Z stassats: but why oh why 2016-09-04T00:53:05Z stassats: i think i removed the commented code for taddcctv stuff some time ago 2016-09-04T00:54:50Z stassats: ok, removing object-not-list-trap object-not-instance-trap 2016-09-04T00:55:22Z stassats: except on x86-64 it's done as (defenum (:start 24) object-not-list-trap object-not-instance-trap #!+sb-safepoint global-safepoint-trap #!+sb-safepoint csp-safepoint-trap) 2016-09-04T00:56:11Z stassats: and those safepoints do #if trap_CspSafepoint != 0x1b # error trap_CspSafepoint mismatch 2016-09-04T00:56:19Z stassats: because it tries to asm("int3; .byte 0x1b;"); 2016-09-04T00:57:37Z nyef: Right, instead of parameterizing the asm. 2016-09-04T00:57:47Z nyef: Lazy! 2016-09-04T00:58:03Z stassats: and int3, that's not going to fly on darwin, is it? 2016-09-04T00:58:12Z nyef: Probably not. 2016-09-04T00:58:26Z stassats: well, safepoints are broken to their core anyway 2016-09-04T00:58:30Z stassats: nobody should use them 2016-09-04T00:58:31Z stassats: but still 2016-09-04T00:58:50Z nyef: So, here's a fun one: In HPPA call.lisp, the single-step-around-trap gets mixed up with the reg-tn-encoding of the callable. 2016-09-04T00:59:15Z nyef: Heh. And here I thought that safepoints were supposed to work? 2016-09-04T00:59:30Z nyef: And they're necessary on windows anyway, aren't they? 2016-09-04T00:59:58Z stassats: well, it's the only thing the windows port can use 2016-09-04T01:00:31Z nyef: Mmm. But the only thing that the windows port really needs them for is threading. 2016-09-04T01:00:38Z stassats: https://bugs.launchpad.net/sbcl/+bug/1424031 2016-09-04T01:01:00Z stassats: and i gave up trying to figure how safepoints handling works 2016-09-04T01:01:40Z npatrick04 quit (Ping timeout: 258 seconds) 2016-09-04T01:02:33Z stassats: curiously, asm("int3; .byte 0x1a;"); is protected by #ifdef LISP_FEATURE_C_STACK_IS_CONTROL_STACK 2016-09-04T01:05:05Z nyef: ... Because that feature is synonymous with "x86oid"? 2016-09-04T01:05:17Z stassats: it is, but only just 2016-09-04T01:06:02Z nyef: Whee... Yet Another HPPA Build. 2016-09-04T01:14:39Z nyef: Oh, god. Whoever put this together didn't know what they were doing. 2016-09-04T01:15:13Z nyef: It looks like the compiler should pitch a fit if someone turned step instrumenting on. 2016-09-04T01:15:29Z attila_lendvai quit (Ping timeout: 260 seconds) 2016-09-04T01:15:40Z nyef: Well... should have, given my current changes. Eesh. 2016-09-04T01:15:51Z nyef: Do we have any tests that cover stepping? 2016-09-04T01:16:38Z nyef: Ah, we do, but they're only enabled for x86, x86-64, ppc, sparc, mips, and arm, not alpha, hppa, or arm64. 2016-09-04T01:20:12Z nyef: On the upside, I guess that means that it doesn't matter if I break it or not. (-: 2016-09-04T01:21:24Z nyef: ... On the downside, there's no easy way to ask the test suite about such disablement, especially since it's defined in terms of a list of supported platforms rather than a list of unsupported platforms. 2016-09-04T01:32:43Z DavidGu joined #sbcl 2016-09-04T01:37:47Z stassats: so, for asm i resorted to 2016-09-04T01:37:52Z stassats: #define XSTR(s) STR(s) #define STR(s) #s 2016-09-04T01:38:02Z stassats: asm("int3; .byte " XSTR(trap_GlobalSafepoint)); 2016-09-04T01:38:03Z stassats: fun 2016-09-04T01:43:51Z nyef: I'm sure there's a cleaner way to do that. 2016-09-04T01:44:04Z stassats: not really 2016-09-04T01:49:27Z nyef: Hrm. Guess there's nothing obvious. 2016-09-04T01:50:38Z em1l_ joined #sbcl 2016-09-04T01:50:39Z stassats: 13 insertions(+), 88 deletions(-) 2016-09-04T01:50:42Z stassats: a nice negative 2016-09-04T01:51:16Z nyef: Very nice. 2016-09-04T01:53:07Z stassats: ok, now to get rid of this pseudo-atomic-trap on mips 2016-09-04T01:53:33Z em1l quit (Ping timeout: 240 seconds) 2016-09-04T02:09:33Z pkhuong quit (Ping timeout: 240 seconds) 2016-09-04T02:11:27Z pkhuong joined #sbcl 2016-09-04T02:11:51Z pkhuong is now known as Guest29115 2016-09-04T02:12:15Z stassats: more code victims 2016-09-04T02:12:30Z stassats: had some lurking overflow-trap-on-addition on ppc 2016-09-04T02:12:48Z DavidGu1 joined #sbcl 2016-09-04T02:13:13Z DavidGu quit (Read error: Connection reset by peer) 2016-09-04T02:13:14Z DavidGu1 is now known as DavidGu 2016-09-04T02:13:27Z stassats: i think sparc still uses some weird stuff for calling alloc 2016-09-04T02:13:43Z stassats: i would have just done the old call a tramp routine 2016-09-04T02:13:56Z stassats: but i neither have sparc nor care about it 2016-09-04T02:15:11Z nyef: sparc is on my list of architectures to "bring up to scratch", but it's at the bottom of that list. 2016-09-04T02:15:56Z nyef: That said, IIRC, that list is currently HPPA and SPARC. 2016-09-04T02:16:09Z nyef: Since I already did a pass at ALPHA and MIPS. 2016-09-04T02:17:37Z stassats: 13 files changed, 15 insertions(+), 139 deletions(-) 2016-09-04T02:17:40Z stassats: across three commits 2016-09-04T02:17:50Z stassats: less code to cause "WTF" 2016-09-04T02:18:58Z stassats: incidentally, i noticed that sloccount now says there are 400k lines of lisp code 2016-09-04T02:21:26Z flavioc joined #sbcl 2016-09-04T02:28:32Z stassats quit (Ping timeout: 240 seconds) 2016-09-04T02:36:14Z nyef: Hrm. Looks like that special case for trap_PendingInterrupt to clear PAI is necessary. 2016-09-04T02:36:17Z nyef: I wonder why? 2016-09-04T02:38:22Z nyef: Of course, I'm waiting out Yet Another Build for confirmation on that. 2016-09-04T03:01:39Z DavidGu quit (Ping timeout: 260 seconds) 2016-09-04T03:07:01Z flavioc quit (Ping timeout: 250 seconds) 2016-09-04T03:12:49Z DavidGu joined #sbcl 2016-09-04T03:16:20Z nyef: ... Damn. That didn't fix it. 2016-09-04T03:17:22Z nyef: ... And I'm out of patience for tonight. 2016-09-04T03:18:56Z DavidGu quit (Ping timeout: 244 seconds) 2016-09-04T05:04:59Z joshe quit (Remote host closed the connection) 2016-09-04T05:05:14Z joshe joined #sbcl 2016-09-04T06:53:42Z DavidGu joined #sbcl 2016-09-04T07:08:22Z DavidGu quit (Ping timeout: 250 seconds) 2016-09-04T07:34:00Z DavidGu joined #sbcl 2016-09-04T08:09:28Z DavidGu quit (Ping timeout: 250 seconds) 2016-09-04T08:09:37Z edgar-rft quit (Quit: edgar-rft) 2016-09-04T08:14:41Z gingerale joined #sbcl 2016-09-04T08:33:05Z DavidGu joined #sbcl 2016-09-04T08:41:18Z attila_lendvai joined #sbcl 2016-09-04T08:44:47Z Bike quit (Quit: often more like always) 2016-09-04T08:52:34Z oleo_ quit (Quit: Leaving) 2016-09-04T09:00:54Z oleo joined #sbcl 2016-09-04T09:18:35Z DavidGu quit (Ping timeout: 250 seconds) 2016-09-04T09:19:24Z DavidGu joined #sbcl 2016-09-04T09:31:49Z scymtym quit (Ping timeout: 255 seconds) 2016-09-04T09:41:15Z DavidGu quit (Ping timeout: 264 seconds) 2016-09-04T09:41:51Z DavidGu joined #sbcl 2016-09-04T09:44:09Z attila_lendvai quit (Ping timeout: 260 seconds) 2016-09-04T09:46:40Z DavidGu quit (Ping timeout: 264 seconds) 2016-09-04T09:49:09Z DavidGu joined #sbcl 2016-09-04T09:53:39Z DavidGu quit (Ping timeout: 244 seconds) 2016-09-04T10:02:54Z irsol quit (Remote host closed the connection) 2016-09-04T10:04:44Z scymtym joined #sbcl 2016-09-04T10:08:26Z irsol joined #sbcl 2016-09-04T10:44:10Z edgar-rft joined #sbcl 2016-09-04T11:07:21Z stassats joined #sbcl 2016-09-04T11:17:30Z shka_ joined #sbcl 2016-09-04T11:47:23Z sjl joined #sbcl 2016-09-04T12:05:40Z chris_l joined #sbcl 2016-09-04T12:26:29Z edgar-rft quit (Quit: edgar-rft) 2016-09-04T12:38:07Z scymtym: i would like to push https://github.com/scymtym/sbcl/commits/wip-compact-error-trap-args except for the final commits (which should wait for hppa,sparc,alpha read-only-tramps). any objections or comments (especially regarding the C code)? 2016-09-04T12:42:14Z stassats: scymtym: not all platforms have read-only-tramps yet 2016-09-04T12:42:44Z scymtym: that's why the final commit cannot go in yet, afaict 2016-09-04T12:43:10Z stassats: you'll have to either encode the traps by hand for them or hope that the changes will follow soon 2016-09-04T12:44:19Z stassats: scymtym: well, all the commits change sc-offsets 2016-09-04T12:44:20Z scymtym: you are right, i didn't think clearly there 2016-09-04T12:44:42Z stassats: now only sparc alpha and hppa have to be changed, so it can be done by hand 2016-09-04T12:44:49Z stassats: but i think nyef is close to having hppa converted 2016-09-04T12:45:18Z scymtym: even the var-int stuff would mean manually recomputing some immediate constants 2016-09-04T12:45:50Z stassats: but i would prefer avoiding doing double work with this manual encoding 2016-09-04T12:46:04Z scymtym: yes, it is risky and wasteful 2016-09-04T12:49:44Z scymtym goes back to writing PARSE-OPTIONS for DEF{PACKAGE,STRUCT,…} 2016-09-04T12:51:15Z stassats: scymtym: and things like #+no defconstant-eqx would have to go before pushing 2016-09-04T12:51:33Z scymtym: right, i forgot about that one 2016-09-04T12:53:53Z scymtym: does it make sense to keep the two "Unify error trap …" commits? the rationale was having the first only rearrange existing code while the second introduces the new function 2016-09-04T12:54:32Z stassats: the more commits the merrier 2016-09-04T12:54:38Z stassats: as long as they are buildable 2016-09-04T12:55:43Z scymtym: i can't that for check all backends, but at least bisection may be easier this way 2016-09-04T13:01:20Z nyef: G'morning. 2016-09-04T13:01:38Z scymtym: hi nyef 2016-09-04T13:06:06Z nyef: Okay, I'm going to finish waking up, then try to figure out how to push the HPPA bits that I have done, then see if I can figure out what went wrong last night. After that I'll make a decision on if I'm going to try to tackle sparc and alpha today. 2016-09-04T13:06:44Z stassats: might i request doing alpha first? 2016-09-04T13:07:02Z stassats: sparc is more available and can be done by someone else 2016-09-04T13:30:41Z scymtym managed to get DEFCONSTANT-EQX to work after some experimentation 2016-09-04T13:34:46Z ASau quit (Read error: Connection reset by peer) 2016-09-04T13:35:05Z ASau joined #sbcl 2016-09-04T14:13:21Z nyef: Still have no clue what's going on with what I was working on last night, but I did manage to sort out my working tree enough to rebase and push the read-only-tramp stuff. 2016-09-04T14:24:54Z nyef: Had to re-seat the SD card in my RPi before it would work enough for me to be able to access the Alpha. 2016-09-04T14:25:04Z nyef: Still working on getting the Alpha to boot. 2016-09-04T14:25:46Z nyef: ... seems to be a netboot machine. 2016-09-04T14:26:33Z nyef: Powering up the MIPS, which is the netboot server... 2016-09-04T14:32:22Z nyef: Hrm. 2016-09-04T14:32:41Z nyef: Okay, no netboot configuration here. 2016-09-04T14:33:14Z nyef: The DHCP configuration exists, but no kernel information for the tftp server, no suitable kernel file in the tftproot. 2016-09-04T14:35:55Z nyef: ... there's a boot CD. I bet I never finished installing this damned thing. 2016-09-04T14:39:25Z nyef: Found the nfsroot, at least. 2016-09-04T14:42:39Z nyef: This... is going to take a bit of doing. 2016-09-04T14:54:23Z attila_lendvai joined #sbcl 2016-09-04T14:54:23Z attila_lendvai quit (Changing host) 2016-09-04T14:54:23Z attila_lendvai joined #sbcl 2016-09-04T15:00:38Z pipping left #sbcl 2016-09-04T15:15:14Z nyef: Okay, alpha is up and running, and sourceforge git access is fixed on the mips box, so time to start with a check-build. 2016-09-04T15:23:53Z whiteline joined #sbcl 2016-09-04T15:25:53Z nyef: Oops. 2016-09-04T15:26:07Z nyef: I may have just crashed the machine? 2016-09-04T15:26:24Z nyef: Ah, no, it was just taking its own sweet, sweet time with fdisk. 2016-09-04T15:34:44Z Bike joined #sbcl 2016-09-04T15:36:49Z scymtym quit (Ping timeout: 258 seconds) 2016-09-04T15:44:52Z nyef: Waking up the SPARC, since most of the time spent for this is going to be waiting on builds anyway, so doing two at once shouldn't be a particular hardship. 2016-09-04T15:51:25Z stassats: huh, stack allocating bignums is actually slower 2016-09-04T15:51:45Z stassats: doesn't make any sense 2016-09-04T15:54:02Z stassats: (for using as fixnum-bignums in truncate) 2016-09-04T15:54:51Z scymtym joined #sbcl 2016-09-04T15:56:19Z nyef: SPARC check-build running. 2016-09-04T15:56:38Z nyef: Is it just SPARC and ALPHA that need doing now? 2016-09-04T15:57:16Z stassats: nyef: right 2016-09-04T15:57:21Z stassats: bignum-truncate on a dx bignum is slower 2016-09-04T15:57:33Z irsol quit (Ping timeout: 240 seconds) 2016-09-04T15:58:32Z nyef: Doesn't DX memory need to be cleared, while heap memory may be presumed to be clear to start with? 2016-09-04T15:58:43Z stassats: that's not it 2016-09-04T16:05:00Z stassats: ok, it's because it can't tail-call bignum-truncate 2016-09-04T16:05:04Z stassats: because of the dx environment 2016-09-04T16:05:43Z irsol joined #sbcl 2016-09-04T16:06:08Z stassats: (the (values t t &optional) (bignum-truncate number divisor)) works better 2016-09-04T16:07:10Z nyef: We never fully sorted out that nested-conditional-dx thing, did we? 2016-09-04T16:07:47Z stassats: stack analyze still fails sometimes 2016-09-04T16:07:53Z nyef: ... It does? 2016-09-04T16:07:58Z nyef: Damnit. 2016-09-04T16:08:04Z nyef: Do you have some examples? 2016-09-04T16:09:09Z attila_lendvai quit (Ping timeout: 260 seconds) 2016-09-04T16:09:32Z stassats: https://bugs.launchpad.net/sbcl/+bugs?field.tag=stack-analysis 2016-09-04T16:11:01Z nyef: Thank you. 2016-09-04T16:11:38Z nyef: Alpha check-build crashed to LDB in !COLD-INIT. /-: 2016-09-04T16:16:25Z nyef: Trying again --with-sb-show --with-sb-qshow. 2016-09-04T16:18:10Z stassats: huh, (sb-kernel:two-arg-> 0.0 -3.4028235e38) calls bignum-gcd? 2016-09-04T16:18:51Z nyef: Is that... mismatched float formats, or the same float format? 2016-09-04T16:19:00Z stassats: the same 2016-09-04T16:19:03Z nyef: Is it calling bignum-gcd at read-time or eval-time? 2016-09-04T16:20:08Z stassats: good question 2016-09-04T16:20:32Z stassats: must be run-time, because it showed up when i broke bignum-gcd 2016-09-04T16:21:09Z nyef: ... doing a check-build on x86-64, so that I can try that stack-analysis test-case. 2016-09-04T16:23:17Z nyef: Ah, right. Undefined function SB!KERNEL:FDEFN-P while compiling src/compiler/globaldb.lisp. 2016-09-04T16:23:19Z nyef: Forgot about that. 2016-09-04T16:24:27Z stassats: the test case is actually (sb-kernel:two-arg-> 0.0 -3.4028235e38) 2016-09-04T16:24:32Z stassats: no 2016-09-04T16:24:42Z stassats: (sb-kernel:two-arg-> 0 -3.4028235e38) 2016-09-04T16:25:23Z nyef: I see a float coercion in some direction there. 2016-09-04T16:25:24Z attila_lendvai joined #sbcl 2016-09-04T16:25:24Z attila_lendvai quit (Changing host) 2016-09-04T16:25:24Z attila_lendvai joined #sbcl 2016-09-04T16:25:49Z stassats: (RATIONAL -3.4028235e38) 2016-09-04T16:25:50Z stassats: in fact 2016-09-04T16:27:59Z stassats: interestingly, GENERIC-> doesn't practice in such foolery 2016-09-04T16:30:19Z stassats: (sb-vm::two-arg-< x 0) does note call gcd 2016-09-04T16:30:24Z stassats: (sb-vm::two-arg-> 0 x) does 2016-09-04T16:30:59Z nyef: Okay, building x86-64 with the fix for the SB!KERNEL:FDEFN-P thing. 2016-09-04T16:31:09Z nyef: (Clearly, my x86oid build host is ancient.) 2016-09-04T16:31:14Z stassats: (well, not gcd but rational) 2016-09-04T16:31:31Z nyef: That might be due to float contagion rules. 2016-09-04T16:31:51Z stassats: i wouldn't think so 2016-09-04T16:33:21Z nyef: ... I have six computers running in order to do three SBCL builds. Something isn't quite right here. 2016-09-04T16:34:08Z stassats: seven computers for seven brothers 2016-09-04T16:34:22Z nyef: Now, see, that would make sense. 2016-09-04T16:35:19Z nyef: Actually, the worst of it is the alpha build, which is accounting for four of them. 2016-09-04T16:35:50Z nyef: (Two MIPS boxes, an ARM, and ALPHA itself.) 2016-09-04T16:36:03Z stassats: i think i see why it happens 2016-09-04T16:36:30Z nyef: Oh? 2016-09-04T16:37:13Z stassats: https://github.com/sbcl/sbcl/blob/master/src/code/numbers.lisp#L887 2016-09-04T16:37:26Z stassats: it tries to coerce a fixnum into a float, but checks if it can fit 2016-09-04T16:37:36Z stassats: though it doesn't check the fixnum, but the float argument 2016-09-04T16:37:44Z stassats: must be X, not Y 2016-09-04T16:39:46Z stassats: a bug since Fri Feb 11 07:32:33 2005 +0000 2016-09-04T16:39:56Z stassats: high time to fix it 2016-09-04T16:40:58Z nyef: Checks a fixnum to see if it's in range for float representation? What? 2016-09-04T16:41:08Z stassats: why not? 2016-09-04T16:41:43Z nyef: Oh. Without loss of precision? 2016-09-04T16:41:58Z stassats: except that it actually checked the float, and for small floats it succeeded 2016-09-04T16:42:11Z stassats: let me try to come up with a case where it burns badly, not just calls RATIONAL 2016-09-04T16:43:46Z nyef: SPARC check-build, one failed contrib: SB-MD5. 2016-09-04T16:45:08Z nyef: Something blew up, recursively, in MD5SUM-SEQUENCE, while running tests. 2016-09-04T16:46:04Z stassats: no sb-rotate-byte? 2016-09-04T16:46:08Z nyef: Test is "SB-MD5.MD5SUM-SEQUENCE-ERROR.0". 2016-09-04T16:46:43Z nyef: And then there's some sort of undefined function in the error-handling path. 2016-09-04T16:46:53Z stassats: i guess rotate-byte includes a portable implementation 2016-09-04T16:47:17Z nyef: Yeah, not dealing with this now. 2016-09-04T16:47:30Z nyef: Running the main test suite now to get a baseline. 2016-09-04T16:49:27Z nyef: Blew up in arith.pure.lisp, some one-arg-= test or other, same result with the error handling. 2016-09-04T16:49:33Z nyef: Guess I AM looking into this next. 2016-09-04T16:52:52Z nyef: x86-64/linux test suite result: four expected failures, no unexpected failures. 2016-09-04T16:53:53Z stassats: sb-kernel:most-negative-exactly-single-float-fixnum => -16777215 2016-09-04T16:54:01Z stassats: but (rational -1.6777216e7) => -16777216 2016-09-04T16:54:07Z nyef: Umm... This isn't a stack-analysis bug. 2016-09-04T16:54:30Z stassats: a stack synthesis bug? 2016-09-04T16:54:42Z nyef: It's blowing up during IR2-convert. 2016-09-04T16:55:01Z stassats: in SB-C::%NIP-VALUES-IR2-CONVERT-OPTIMIZER 2016-09-04T16:55:04Z nyef: Right. 2016-09-04T16:55:15Z nyef: Tabling it for the moment, the SPARC problem is more important right now. 2016-09-04T16:55:17Z stassats: which comes from stack analysis 2016-09-04T16:55:50Z nyef: ... We're not in a convert-blated-block or whatever it is, are we? 2016-09-04T16:56:23Z nyef: Whatever, I'll look into it more later, SPARC and ALPHA first! 2016-09-04T16:57:10Z sjl quit (Read error: Connection reset by peer) 2016-09-04T16:58:25Z nyef: What was the easy way to get to LDB? 2016-09-04T17:00:12Z nyef: (alien-funcall (extern-alien "monitor_or_something" (function int))), only more properly not with that return type. 2016-09-04T17:01:07Z nyef: The undefined function in question is SHOW0. 2016-09-04T17:01:48Z stassats: i think > being wrongly converted actually didn't pose a correctness problem, it sort of canceled out the wrongness 2016-09-04T17:02:03Z stassats: nyef: ldb_monitor (function (values)) 2016-09-04T17:02:25Z nyef: Thank you. 2016-09-04T17:03:46Z stassats: show0 being undefined in the runtime, showing up everywhere, and not even having even the right symbol to get redefined 2016-09-04T17:03:49Z stassats: infuriates me 2016-09-04T17:05:11Z nyef: Ah! Found it. 2016-09-04T17:05:19Z nyef: Commit e01d089efd4f7e36cc3e9c1498d111a2b8ccd4b4 removed the leading slash. 2016-09-04T17:05:29Z nyef: Thank you so much for that. d-: 2016-09-04T17:05:55Z nyef: Doing a check-build now. 2016-09-04T17:06:09Z stassats: too bad i didn't remove it wholesale 2016-09-04T17:06:25Z nyef: Yeah, it's standard equipment on more than one of these INTERNAL-ERROR-ARGS functions. 2016-09-04T17:07:05Z nyef: I'll do up the commit to fix it, since I'm working on the sparc stuff anyway. 2016-09-04T17:07:35Z karswell joined #sbcl 2016-09-04T17:07:43Z stassats: ok, i think MOST-POSITIVE-EXACTLY-SINGLE-FLOAT-FIXNUM not actually having the right value saved it 2016-09-04T17:08:43Z stassats: maybe it was a cunning plan all along 2016-09-04T17:09:38Z stassats: right now the limit is 16777215 (the actual limit is 16777216) 2016-09-04T17:10:23Z stassats: (> 16777217 16777216.0) would have been (> (float 16777217) 16777216.0) => (> 16777216.0 16777216.0) => NIL 2016-09-04T17:10:54Z stassats: but since the limit is lower, (> 16777217 16777215.0) goes into (> 16777216.0 16777215.0) and is true 2016-09-04T17:12:24Z stassats: but of course it's clearly wrong, but two wrongs did cancel each other 2016-09-04T17:12:40Z nyef: "Two wrongs don't make a right, but three lefts do." 2016-09-04T17:14:37Z stassats: ok, now rational won't be called for small fixnums 2016-09-04T17:14:44Z stassats: but it seems like the wrong tool anyway 2016-09-04T17:17:42Z nyef: alpha blows up in !PRIMORDIAL-TYPE-COLD-INIT... 2016-09-04T17:18:22Z nyef: ... by setting the program counter to #x1068? What? 2016-09-04T17:19:07Z stassats: it just wanted to attend the birthday of Henry I 2016-09-04T17:19:18Z nyef: Heh. 2016-09-04T17:19:55Z nyef: Is this the first real use of globaldb in the warm core? 2016-09-04T17:21:19Z PuercoPop quit (Ping timeout: 250 seconds) 2016-09-04T17:24:20Z stassats: ok, (> 123 -3.4028235e38) is now not horribly slow 2016-09-04T17:24:26Z nyef: ... It's doing a call somewhere. The LRA is pointing to an LRA within CODE. 2016-09-04T17:24:41Z nyef: reg_LRA is pointing to an LRA within reg_CODE. 2016-09-04T17:24:42Z stassats: but (foo 123454556 -3.4028235e38) is 2016-09-04T17:25:14Z nyef: Is there going to be any trouble with double-floats for this? 2016-09-04T17:25:24Z stassats: don't think so 2016-09-04T17:26:53Z stassats: ok, i don't think i can use unary-truncate without know what the operation actually is 2016-09-04T17:27:25Z stassats: or maybe i can 2016-09-04T17:29:30Z nyef: Rebuilding ALPHA to try and get a trace file. 2016-09-04T17:30:05Z edgar-rft joined #sbcl 2016-09-04T17:30:48Z PuercoPop joined #sbcl 2016-09-04T17:34:43Z stassats: ok, to truly optimize fixnum-float comparisons i do need to know which it ways it compares 2016-09-04T17:34:52Z stassats: to avoid producing bignums 2016-09-04T17:38:41Z sjl joined #sbcl 2016-09-04T17:41:32Z stassats: now what is the smallest float that can no longer fit into a fixnum when truncated? 2016-09-04T17:41:49Z stassats: (float most-positive-fixnum) doesn't sound right 2016-09-04T17:47:28Z flavioc joined #sbcl 2016-09-04T17:49:08Z nyef: Hunh. :SLAM-FORCIBLY is new. 2016-09-04T17:49:36Z stassats: as opposed to slam gently? 2016-09-04T17:49:52Z nyef: SPARC is building contribs, ALPHA is *just* getting me the trace files that I need (though I'll also need a running system in order to use them to good effect). 2016-09-04T17:50:34Z stassats: so, you're not cross building? 2016-09-04T17:50:58Z nyef: No, a native build is a better exercise of the system. 2016-09-04T17:51:19Z stassats: a better exercise of your nerves 2016-09-04T17:51:49Z nyef: Yeah, well, it seems as though native compilation has gotten a lot slower over the last nine months. 2016-09-04T17:52:01Z nyef: Or it could "just" be my memory playing up. 2016-09-04T17:52:10Z stassats: i haven't noticed 2016-09-04T17:52:36Z stassats: 2:21.59elapsed 2016-09-04T17:52:45Z stassats: well, it may have been closer to 2:18 2016-09-04T17:52:55Z stassats: so, i guess 3 seconds is a lot 2016-09-04T17:57:25Z ASau` joined #sbcl 2016-09-04T17:58:01Z nyef: Okay, NOW trying to run the test suite on SPARC. 2016-09-04T17:58:11Z ASau quit (Read error: Connection reset by peer) 2016-09-04T18:01:15Z ASau` is now known as ASau 2016-09-04T18:01:58Z nyef: Hrm. That was useless. 2016-09-04T18:02:22Z nyef: Some sort of recursive corruption error. 2016-09-04T18:02:34Z nyef: Running just the pure tests now. 2016-09-04T18:02:42Z chris_l quit (Remote host closed the connection) 2016-09-04T18:05:24Z nyef: Yeah, that triggered it. 2016-09-04T18:07:19Z nyef: Clearly, SPARC doesn't get nearly enough love. 2016-09-04T18:10:05Z stassats: ok, will leave non-consing fast fixnum-float comparisons for later 2016-09-04T18:10:29Z stassats: will just commit the basic-compare fix 2016-09-04T18:26:15Z sjl quit (Ping timeout: 258 seconds) 2016-09-04T18:27:01Z nyef: SPARC is blowing up on compiler.pure.lisp / (:LAMBDA-LIST &REST :MISSING-NAME). 2016-09-04T18:30:37Z nyef: And, as usual, the complete lack of interrupt contexts for a memory fault does not help. 2016-09-04T18:39:17Z nyef: ... seems to be blowing up in GET-INFO-VALUE? 2016-09-04T18:44:50Z nyef: Okay, (compile nil '(lambda (&rest) 12)) doesn't actually compile anything, it just returns a closure that should invoke an sb-int:compiled-program-error. 2016-09-04T18:45:27Z nyef: No idea what's going on there. 2016-09-04T19:01:54Z sjl joined #sbcl 2016-09-04T19:05:42Z jrm joined #sbcl 2016-09-04T19:14:09Z nyef: ... What's this !ENCAPSULATE-STUFF-FOR-COLD-INIT thing? 2016-09-04T19:21:48Z nyef: Lovely. More magic. 2016-09-04T19:28:57Z nyef: Time to come at this in another direction. PC is #x1068. LIP is #x1069. Where do these numbers come from? 2016-09-04T19:30:03Z nyef: Closest match in the register set is L0, at #x1052. 2016-09-04T19:42:31Z nyef: And that's the instance header for the instance in LEXENV, which is probably the closure-function... 2016-09-04T19:43:16Z nyef: Oh, wait, that doesn't make sense. 2016-09-04T19:47:18Z nyef: Looks like things more-or-less line up if this is a botch with tail-call-variable. 2016-09-04T19:47:58Z nyef: Somehow catching an instance-pointer instead of a closure or simple-fun in the lexenv. 2016-09-04T20:12:37Z shka_ quit (Ping timeout: 255 seconds) 2016-09-04T20:15:36Z nyef: Problem with the tail-call-variable theory is that CODE points to the same component as LRA. 2016-09-04T20:17:31Z nyef: No tail-call from !PRIMORDIAL-TYPE-COLD-INIT. 2016-09-04T20:36:27Z gingerale quit (Remote host closed the connection) 2016-09-04T20:45:11Z nyef: ... I found it. The closure tramp address is wrong, probably due at least partly to the stupid LRA-page hack. I'm going to go find a corner to cry into now. 2016-09-04T20:45:36Z stassats: careful, don't trip on a corner case 2016-09-04T20:46:44Z nyef: And it's your breaking change, too! From Thursday! 2016-09-04T20:48:58Z nyef: So, I'm going to go take a break for a bit, and then I'm going to Fix This Mess. 2016-09-04T20:49:14Z stassats: which change on which arch? 2016-09-04T20:49:32Z nyef: ff58cd3e56945360441ab7012627193910e14554 where it touches alpha-assem.S. 2016-09-04T20:50:18Z stassats: removing the length byte? 2016-09-04T20:50:41Z nyef: Yup. Trimmed things down to the point where aligned addresses shifted by four bytes. 2016-09-04T20:50:55Z nyef: Which screwed up the dead-reckoning for finding the closure-tramp. 2016-09-04T20:51:04Z stassats: well, it shouldn't have used magic aligning then 2016-09-04T20:51:34Z nyef: Of course it shouldn't, but the entire mess is magic on alpha because of the heap width thing. 2016-09-04T20:52:17Z nyef: So, as soon as the tramps are moved to read-only space, the worst of the damage just falls out. 2016-09-04T20:53:34Z stassats: an offset from call_into_lisp? what? 2016-09-04T20:54:50Z stassats: well, good luck moving that into assembly routines 2016-09-04T20:57:09Z stassats: call_into_lisp_LRA is a collection of trampolines written in asm - see alpha-assem.S. We copy it to call_into_lisp_LRA_page where VOPs and things can find it. (I don't know why they can't find it where it was to start with.) 2016-09-04T20:57:11Z stassats: weird stuff 2016-09-04T20:57:34Z stassats: is that like from before dinosaurs? 2016-09-04T20:59:20Z stassats: it's been that way since 1994-03-27 2016-09-04T20:59:56Z stassats: when the alpha port materialized 2016-09-04T21:00:28Z stassats: why is it even called call_into_lisp_LRA, LRA? 2016-09-04T21:01:53Z nyef: Because it starts with the LRA in call_into_lisp. 2016-09-04T21:02:19Z nyef: Because machine pointers are 64 bits wide, but heap pointers only 32, and an LRA is a boxed object. 2016-09-04T21:02:30Z stassats: oh that madness 2016-09-04T21:03:11Z nyef: The bit that gets me is that I don't see how on earth funcallable-instance-tramp can be working. 2016-09-04T21:04:05Z stassats: well, it was added in the modern times 2016-09-04T21:04:15Z stassats: without the conception of call_into_lisp_LRA 2016-09-04T21:15:04Z angavrilov quit (Remote host closed the connection) 2016-09-04T21:30:18Z rudolfochrist joined #sbcl 2016-09-04T21:30:34Z attila_lendvai quit (Ping timeout: 260 seconds) 2016-09-04T21:36:21Z nyef: Okay, first build attempt of alpha with read-only-tramps. 2016-09-04T21:38:12Z rudolfochrist quit (Quit: ERC (IRC client for Emacs 25.1.1)) 2016-09-04T21:44:11Z nyef: Nothing obvious in terms of tramp-related damage on sparc, at least. 2016-09-04T21:44:23Z nyef: I don't know if that's a good thing or a bad thing, but it's a thing. 2016-09-04T21:46:47Z attila_lendvai joined #sbcl 2016-09-04T21:46:47Z attila_lendvai quit (Changing host) 2016-09-04T21:46:47Z attila_lendvai joined #sbcl 2016-09-04T22:14:13Z nyef: Sparc seems to be doing some wildly off-base memory access (word write to #xf3675062) in ERROR. 2016-09-04T22:15:13Z nyef: ... Alpha build just blew up. 2016-09-04T22:15:42Z nyef: Undefined instruction WORD, undefined variable LRA-TN. 2016-09-04T22:17:21Z nyef: ... Because the actual instruction is LWORD, and it doesn't support fixups. Lovely. 2016-09-04T22:34:02Z stassats: try to avoid calling rational, but now what about making rational faster as well 2016-09-04T22:42:16Z stassats: ok, isn't (/ (ash int (+ ex 24)) (ash 1 24)) == (ash int ex)? 2016-09-04T22:43:56Z stassats: that makes (loop repeat 1000000 do (rational 3.4028235e38)) 0.216/159,999,824 into 0.032/47,999,392 seconds/bytes 2016-09-04T22:49:15Z nyef: Two missed word->lword changes in insts.lisp. Restarting build. 2016-09-04T22:55:23Z nyef: Rebuilding on sparc to obtain a trace-file for compiler/target-main.lisp. 2016-09-04T22:55:46Z nyef: I'm suspecting something going wrong with the closure at the end, but I'm not at all certain about it. 2016-09-04T22:56:55Z stassats: (rational 0.00000000000003) is still pretty slow, what if i build a table of (ash 1 (- exp)) 2016-09-04T23:02:09Z Xof quit (Ping timeout: 260 seconds) 2016-09-04T23:03:48Z nyef: I'm somewhat waiting for the sparc problem to be some odd glitch with the closure trampoline or something. 2016-09-04T23:07:12Z nyef: Messed up FIXUP-CODE-OBJECT on alpha, restarting build. 2016-09-04T23:08:20Z stassats: or (ash 1 (- exp)) can be stack allocated 2016-09-04T23:10:21Z nyef: The alien stack is always less than 4G in size, right? 2016-09-04T23:10:41Z stassats: on 32 bits? 2016-09-04T23:10:54Z nyef: Even on 64 bits. 2016-09-04T23:11:08Z nyef: Hrm. Actually, there's a 32-bit assumption on it in alpha anyway. 2016-09-04T23:14:15Z stassats: ok, a table of exponents doesn't cut down on run time, just on consing 2016-09-04T23:14:22Z stassats: might as well figure how to dx it instead 2016-09-04T23:15:44Z stassats: around 150 bytes for the largest 2016-09-04T23:21:25Z stassats: i'll settle to just improving large float integers 2016-09-04T23:22:53Z nyef: I think that I'll be happy enough if I can get the alpha tramps out the door tonight, and sparc to the point of running the test suite. 2016-09-04T23:25:22Z stassats: dxing small bignums will help here too, that's actually how i stumbled upon this problem 2016-09-04T23:25:31Z stassats: by breaking gcd 2016-09-04T23:26:08Z stassats: basically i need to converted make-small-bignum into with-small-bignum which makes it DX 2016-09-04T23:26:34Z stassats: too bad it'll only help x86oids 2016-09-04T23:28:53Z nyef: Why only x86oids? 2016-09-04T23:29:09Z stassats: can't dx into the number stack 2016-09-04T23:33:00Z nyef: Hrm. 2016-09-04T23:33:13Z nyef: On the one hand, "oh, right". On the other hand... 2016-09-04T23:33:49Z nyef: So, it'll only help x86oids for the moment, but we can do something about that. 2016-09-04T23:34:10Z stassats: i think there'll be less problems with stack analysis 2016-09-04T23:34:12Z stassats: for one thing 2016-09-04T23:34:37Z nyef: Hah! 2016-09-04T23:34:58Z nyef: You still don't get to cross the streams^Wlifetimes. 2016-09-04T23:35:27Z stassats: at least unknown values are not there 2016-09-04T23:38:34Z nyef: I don't know that it costs us anything to treat them both as one stack for the purposes of analysis, though. 2016-09-04T23:38:52Z nyef: ... Although there is the %NIP-VALUES thing. 2016-09-04T23:39:11Z nyef: Anyway, not a Right Now problem. 2016-09-04T23:40:06Z stassats: it's not like we got the control stack right 2016-09-04T23:40:24Z stassats: to go boasting about getting the number stack dx 2016-09-04T23:40:26Z nyef: There's only the one known issue right now, though, isn't there? Or is there another? 2016-09-04T23:40:38Z stassats: crash, one 2016-09-04T23:40:59Z stassats: but for stuff like conditionals etc. it's suboptimial 2016-09-04T23:48:27Z nyef: Missed that I needed a :TEMP for LEXENV-TN in two of the tramps on alpha. 2016-09-04T23:55:06Z nyef: We're still using 30-bit fixnums on 32-bit platforms, aren't we?