Thread View: gnu.gcc.bug
1 messages
1 total messages
Started by Rob McMahon
Sat, 24 Sep 1988 22:46
Null pointer dereference in GCC 1.28
Author: Rob McMahon
Date: Sat, 24 Sep 1988 22:46
Date: Sat, 24 Sep 1988 22:46
28 lines
1317 bytes
1317 bytes
GCC 1.28 expr.c (expand_call) somewhere around line 3679:
/* If the address for a structure value should be in memory,
and it would go in memory if treated as an extra parameter,
treat it that way. */
if (structure_value_addr && GET_CODE (struct_value_rtx) == MEM)
{
rtx tem;
INIT_CUMULATIVE_ARGS (args_so_far, funtype);
tem = FUNCTION_ARG (args_so_far, Pmode,
build_pointer_type (TREE_TYPE (funtype)), 1);
=> if (GET_CODE (tem) == MEM)
{
If FUNCTION_ARG returns 0, this causes an almost-null pointer dereference
(actually the gould assembler gives up on this, but that's another story ...)
Make that
if (tem != 0 && GET_CODE (tem) == MEM)
?
Rob
--
UUCP: ...!mcvax!ukc!warwick!cudcv PHONE: +44 203 523037
JANET: cudcv@uk.ac.warwick ARPA: cudcv@warwick.ac.uk
Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England
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