Bug 170876

Summary: glutInit() mangles argv
Product: [Fedora] Fedora Reporter: Orion Poplawski <orion>
Component: freeglutAssignee: X/OpenGL Maintenance List <xgl-maint>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-10-20 23:56:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Orion Poplawski 2005-10-14 21:05:23 UTC
Description of problem:
Calling glutInit(&argc, argv) mangles argv.  Test case:

#include <GL/glut.h>
#include <stdio.h>

int
main(int argc, char **argv)
{
    int i;

    for (i=1; i < argc; i++) {
        printf("argv[%d]=%s\n",i,argv[i]);
    }

    glutInit(&argc, argv);

    for (i=1; i < argc; i++) {
        printf("argv[%d]=%s\n",i,argv[i]);
    }
}

$ ./testglut -sync -arg2 arg3
argv[1]=-sync
argv[2]=-arg2
argv[3]=arg3
argv[1]=-arg2
argv[2]=-arg2

last two lines should be:

argv[1]=-arg2
argv[2]=arg3

Version-Release number of selected component (if applicable):
freeglut-2.2.0-16

How reproducible:
everytime

Comment 1 Orion Poplawski 2005-10-14 21:11:36 UTC
Note that this is fixed in 2.4.0.  I vote for an errate release.

Comment 2 Mike A. Harris 2005-10-20 23:56:03 UTC
Thanks for the report.  freeglut-2.4.0 is now present in Fedora development,
which should address this problem.

There are no plans on releasing freeglut 2.4.0 for Fedora Core 4 at this
time.  If someone attaches a minimal patch to fix this issue in
freeglut 2.2.0 to this report, and reopens it, we will review the
patch for consideration in a freeglut-2.2.0 update however.

Setting status to "RAWHIDE"