Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Mar 2001 08:03:18 -0800 (PST)
From:      jimz@panasas.com
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/25923: vm_map.h defines a macro called "min_offset" that creates problems with similarly-named variables
Message-ID:  <200103191603.f2JG3IR48370@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         25923
>Category:       kern
>Synopsis:       vm_map.h defines a macro called "min_offset" that creates problems with similarly-named variables
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 19 08:10:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Jim Zelenka
>Release:        4.1.1-RELEASE
>Organization:
Panasas, Inc
>Environment:
FreeBSD nagano.panasas.com 4.1.1-RELEASE FreeBSD 4.1.1-RELEASE #0: Thu Mar  8 12:49:16 EST 2001     root@nagano.panasas.com:/usr/src/sys/compile/NAGANO-HZ  i386

>Description:
/usr/src/sys/vm/vm_map.h contains the following line of code:
   #define       min_offset              header.start

This causes problems for code using a variable named min_offset. At best,
it fails to compile. At worst, the code contains a structure named
header with a field named start, and this creates a very mysterious
memory-corruption bug.

>How-To-Repeat:
Include vm_map.h in a file using a local variable named min_offset

>Fix:
"A whole lot of query-replace" :-)

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200103191603.f2JG3IR48370>