NetBSD Problem Report #22119

Received: (qmail 23485 invoked by uid 605); 11 Jul 2003 08:06:05 -0000
Message-Id: <>
Date: Fri, 11 Jul 2003 10:02:36 +0100 (BST)
Subject: lint segv on malformed function pointer cast
X-Send-Pr-Version: 3.95

>Number:         22119
>Category:       toolchain
>Synopsis:       lint segv on malformed function pointer cast
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    toolchain-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 11 08:07:00 +0000 2003
>Closed-Date:    Sun Feb 28 23:01:52 +0000 2021
>Last-Modified:  Sun Feb 28 23:01:52 +0000 2021
>Originator:     Nick Hudson
>Release:        NetBSD 1.6.1_STABLE
System: NetBSD kenny 1.6.1_STABLE NetBSD 1.6.1_STABLE (KENNY) #0: Fri May 30 10:12:33 BST 2003 nick@kenny:/home/nick/work/netbsd/netbsd-1-6/src/sys/arch/i386/compile/KENNY i386
Architecture: i386
Machine: i386

Also exists in -current where I originally came across the problem;
	As synopsis
	Run lint on the following

		void (*f1)(void);

	 	* f1 = (void (*)(void))p; is OK
		f1 = (void *()(void))p;
	No idea.
Responsible-Changed-From-To: bin-bug-people->toolchain-manager
Responsible-Changed-When: Fri, 28 Jan 2005 05:29:16 +0000
toolchain issue

From: "Roland Illig" <>
Subject: PR/22119 CVS commit: src
Date: Sun, 28 Feb 2021 22:12:17 +0000

 Module Name:	src
 Committed By:	rillig
 Date:		Sun Feb 28 22:12:17 UTC 2021

 Modified Files:
 	src/distrib/sets/lists/tests: mi
 	src/tests/usr.bin/xlint/lint1: Makefile
 	src/usr.bin/xlint/lint1: tree.c
 Added Files:
 	src/tests/usr.bin/xlint/lint1: d_pr_22119.c d_pr_22119.exp

 Log Message:
 lint: fix null pointer dereference on parse error

 Fixes PR bin/22119.

 To generate a diff of this commit:
 cvs rdiff -u -r1.1023 -r1.1024 src/distrib/sets/lists/tests/mi
 cvs rdiff -u -r1.33 -r1.34 src/tests/usr.bin/xlint/lint1/Makefile
 cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/d_pr_22119.c \
 cvs rdiff -u -r1.31 -r1.32 src/tests/usr.bin/xlint/lint1/
 cvs rdiff -u -r1.231 -r1.232 src/usr.bin/xlint/lint1/tree.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-When: Sun, 28 Feb 2021 23:01:52 +0000

Thanks for the PR, lint no longer crashes on your code sample.
The fix will be part of the upcoming NetBSD 10 release.


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD:,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.