classilla / cryanc

TLS for the Internet of Old Things

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IRIX core dump (even with gcc)

larb0b opened this issue · comments

This issue is already mentioned in the README, but I figured it was probably worth mentioning that the same issue occurs even when built with GCC 9.2.0.

$ gdb carl
GNU gdb (GDB) 7.6.2
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "mips-sgi-irix6.5".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /ssds/usr/people/larbob/Projects/cryanc/carl...done.
(gdb) r https://github.com
Starting program: /ssds/usr/people/larbob/Projects/cryanc/carl https://github.com

Program received signal SIGSEGV, Segmentation fault.
0x100596a4 in tls_packet_update (packet=0x100c2d98) at cryanc.c:39608
39608               *(unsigned short *)(packet->buf + 3) = htons(packet->len - header_size);
(gdb)

Since IRIX is big-endian, all those htons()s and htonl()s that crash like that can be turned into no-ops. I just haven't gotten around to doing it. PRs accepted.

Okay, give it a try. If you get it working with gcc, then adjust the recipe and PR it. I only have MIPSPro on my systems.

Yep, it seems to work fine with GCC 9.2.0 from SGUG-RSE with no adjustments. Let me know if you'd like me to submit a PR removing the warning about it not being tested on GCC, but otherwise it should be fine without any changes.

What I think I'll do is just mark it as a "contributed" configuration. gcc 9 is kinda new, so it might be good to see how well it works with older ones (it should work fine, but who knows). I'll close this out; advise if you do find a bug somewhere since I might not have gotten all the weirdo pointers. SPARC is next.