Bug 170876 - glutInit() mangles argv
glutInit() mangles argv
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: freeglut (Show other bugs)
4
All Linux
medium Severity medium
: ---
: ---
Assigned To: X/OpenGL Maintenance List
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-10-14 17:05 EDT by Orion Poplawski
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-10-20 19:56:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Orion Poplawski 2005-10-14 17:05:23 EDT
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 17:11:36 EDT
Note that this is fixed in 2.4.0.  I vote for an errate release.
Comment 2 Mike A. Harris 2005-10-20 19:56:03 EDT
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"

Note You need to log in before you can comment on or make changes to this bug.