🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Ray Moody Fri, 07 Jul 1989 21:18
ptrace and the 68881
#61
Author: Ray Moody
Date: Fri, 07 Jul 1989 21:18
48 lines
1749 bytes
Index:	sys/sys_process.c 4.3BSD + ISI4.0D

Version:
	    This bug is in Integrated Solutions Incorporated
	implementation of ptrace.  It does not appear in standard 4.3 BSD.

Description:
	    Ptrace does not allow writes to u.U_FLOAT.  If you use
	dbx, this makes no difference whatsoever (because dbx can't handle
	register floats anyway), but it is important if you use gcc and gdb.

Repeat-By:
	    Run gdb and try to set a register variable (even a register
	variable declared as an integer).  You will see:

	       writing register number 18: I/O error.

Fix:
	RCS file: RCS/sys_process.c,v
	retrieving revision 1.1
	retrieving revision 1.1.1.1
	diff -c -r1.1 -r1.1.1.1
	*** /tmp/,RCSt1026463	Fri Jul  7 16:15:21 1989
	--- /tmp/,RCSt2026463	Fri Jul  7 16:15:22 1989
	***************
	*** 195,202
	  			ipc.ip_data &=  ~PSL_USERCLR;
	  			goto ok;
	  		}
	! 		goto error;
	! 
	  	ok:
	  		*p = ipc.ip_data;
	  		break;
	
	--- 195,206 -----
	  			ipc.ip_data &=  ~PSL_USERCLR;
	  			goto ok;
	  		}
	! 		/* RAY: Allow writes into u.U_FLOAT */
	! 		if ((unsigned) p < (unsigned) &u.U_FLOAT)
	! 			goto error;
	! 		if ((unsigned) p >
	! 		    (unsigned) &u.U_FLOAT + sizeof(u.U_FLOAT) - sizeof(*p))
	! 			goto error;
	  	ok:
	  		*p = ipc.ip_data;
	  		break;
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads