Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 556432 Details for
Bug 672032
>=sys-devel/gcc-7.4.0: internal compiler error: Segmentation fault when building net-analyzer/netcat-110-r9
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
nc.i
nc.i (text/x-csrc), 7.69 KB, created by
Sergei Trofimovich (RETIRED)
on 2018-11-26 23:54:29 UTC
(
hide
)
Description:
nc.i
Filename:
MIME Type:
Creator:
Sergei Trofimovich (RETIRED)
Created:
2018-11-26 23:54:29 UTC
Size:
7.69 KB
patch
obsolete
>//LANG=C powerpc-unknown-linux-gnu-gcc -O2 -mcpu=powerpc -pipe -o nc.i -c nc.c > > typedef unsigned short int __uint16_t; > typedef unsigned int __uint32_t; > typedef struct _IO_FILE FILE; > extern struct _IO_FILE *stdout; > extern struct _IO_FILE *stderr; > typedef struct { unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; } > __sigset_t; > enum __socket_type { SOCK_STREAM = 1, SOCK_DGRAM = 2, SOCK_RAW = 3, SOCK_RDM = 4, SOCK_SEQPACKET = 5, SOCK_DCCP = 6, SOCK_PACKET = 10, SOCK_CLOEXEC = 02000000, SOCK_NONBLOCK = 00004000 }; > typedef unsigned short int sa_family_t; > struct sockaddr { sa_family_t sa_family; char sa_data[14]; }; > typedef __uint16_t uint16_t; > typedef __uint32_t uint32_t; > typedef uint32_t in_addr_t; > struct in_addr { in_addr_t s_addr; }; > enum { IPPROTO_IP = 0, IPPROTO_ICMP = 1, IPPROTO_IGMP = 2, IPPROTO_IPIP = 4, IPPROTO_TCP = 6, IPPROTO_EGP = 8, IPPROTO_PUP = 12, IPPROTO_UDP = 17, IPPROTO_IDP = 22, IPPROTO_TP = 29, IPPROTO_DCCP = 33, IPPROTO_IPV6 = 41, IPPROTO_RSVP = 46, IPPROTO_GRE = 47, IPPROTO_ESP = 50, IPPROTO_AH = 51, IPPROTO_MTP = 92, IPPROTO_BEETPH = 94, IPPROTO_ENCAP = 98, IPPROTO_PIM = 103, IPPROTO_COMP = 108, IPPROTO_SCTP = 132, IPPROTO_UDPLITE = 136, IPPROTO_MPLS = 137, IPPROTO_RAW = 255, IPPROTO_MAX }; > typedef uint16_t in_port_t; > struct sockaddr_in { sa_family_t sin_family; in_port_t sin_port; struct in_addr sin_addr; unsigned char sin_zero[sizeof (struct sockaddr) - (sizeof (unsigned short int)) - sizeof (in_port_t) - sizeof (struct in_addr)]; }; > extern char *inet_ntoa (struct in_addr __in) __attribute__ ((__nothrow__ , __leaf__)); > typedef long int __jmp_buf[64 + (12 * 4)] __attribute__ ((__aligned__ (16))); > struct __jmp_buf_tag { __jmp_buf __jmpbuf; int __mask_was_saved; __sigset_t __saved_mask; }; > typedef struct __jmp_buf_tag sigjmp_buf[1]; > extern int *__errno_location (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); > struct host_poop { char name[256]; char addrs[8][24]; struct in_addr iaddrs[8]; }; > sigjmp_buf jbuf; > int gatesidx = 0; > int gatesptr = 4; > struct sockaddr_in * lclend = ((void *)0) ; > struct sockaddr_in * remend = ((void *)0) ; > struct host_poop ** gates = ((void *)0) ; > char * optbuf = ((void *)0) ; > unsigned short o_allowbroad = 0; > unsigned short o_listen = 0; > unsigned short o_udpmode = 0; > unsigned short o_verbose = 0; > unsigned short o_holler_stderr = 1; > unsigned int o_wait = 0; > void holler (str, p1, p2, p3, p4, p5, p6) char * str; > char * p1, * p2, * p3, * p4, * p5, * p6; > { FILE *o_holler_out = (o_holler_stderr ? stderr : stdout ); if (o_verbose) { fprintf (o_holler_out, str, p1, p2, p3, p4, p5, p6); if ( (*__errno_location ()) ) { perror (" "); } else fprintf (o_holler_out, "\n"); fflush (o_holler_out); } } > int doconnect (rad, rp, lad, lp) struct in_addr * rad; > unsigned short lp; > { register int nnetfd; register int rr; int x, y; (*__errno_location ()) = 0; newskt: if (o_udpmode) nnetfd = socket ( 2 , SOCK_DGRAM , IPPROTO_UDP ); else nnetfd = socket ( 2 , SOCK_STREAM , IPPROTO_TCP ); if (nnetfd < 0) bail ("Can't get socket"); if (nnetfd == 0) goto newskt; x = 1; rr = setsockopt (nnetfd, 1 , 2 , &x, sizeof (x)); if (rr == -1) holler ("nnetfd reuseaddr failed"); if (o_allowbroad) { rr = setsockopt (nnetfd, 1 , 6 , &x, sizeof (x)); if (rr == -1) holler ("nnetfd reuseaddr failed"); } rr = setsockopt (nnetfd, 1 , 15 , &x, sizeof (x)); if (rr == -1) holler ("nnetfd reuseport failed"); lclend->sin_family = 2 ; lclend->sin_family = 2 ; remend->sin_family = 2 ; if (lad) memcpy (&lclend->sin_addr.s_addr, lad, sizeof (struct in_addr)); if (lp) lclend->sin_port = __uint16_identity ( lp ) ; rr = 0; if (lad || lp) { x = (int) lp; for (y = 4; y > 0; y--) { rr = bind (nnetfd, (struct sockaddr *)lclend, sizeof (struct sockaddr)); if (rr == 0) break; if ( (*__errno_location ()) != 98 ) break; else { holler ("retrying local %s:%d", inet_ntoa (lclend->sin_addr), lp); sleep (2); (*__errno_location ()) = 0; } } } if (rr) bail ("Can't grab %s:%d with bind", inet_ntoa(lclend->sin_addr), lp); if (o_listen) return (nnetfd); memcpy (&remend->sin_addr.s_addr, rad, sizeof (struct in_addr)); remend->sin_port = __uint16_identity ( rp ) ; if (gatesidx) { if (! optbuf) { char * opp; optbuf = Hmalloc (48); opp = optbuf; *opp++ = 131 ; *opp++ = (char) (((gatesidx + 1) * sizeof (struct in_addr)) + 3) & 0xff; *opp++ = gatesptr; for ( x = 0; x < gatesidx; x++) { memcpy (opp, gates[x]->iaddrs, sizeof (struct in_addr)); opp += sizeof (struct in_addr); } memcpy (opp, rad, sizeof (struct in_addr)); opp += sizeof (struct in_addr); *opp = 1 ; } x = ((gatesidx + 1) * sizeof (struct in_addr)) + 4; rr = setsockopt (nnetfd, IPPROTO_IP , 4 , optbuf, x); if (rr == -1) bail ("srcrt setsockopt fuxored"); } arm_timer (1, o_wait); if ( __sigsetjmp ( jbuf , 1 ) == 0) { rr = connect (nnetfd, (struct sockaddr *)remend, sizeof (struct sockaddr)); } else { rr = -1; (*__errno_location ()) = 110 ; } arm_timer (0, 0); if (rr == 0) return (nnetfd); close (nnetfd); return (-1); }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 672032
:
556422
|
556424
|
556426
|
556432
|
556442