mktemp() broken?

mktemp() broken?

Post by Yermo Manfred Lame » Sat, 13 Nov 1993 09:58:55



I may have found a linux system library bug.

The following program causes a segmentation fault on my system:
Linux SLS 1.03 w/ patch .13 applied on a generic 16MB 486 w/ SCSI disk.

main()
{
mktemp("mktempXXXXXX");

Quote:}

the following output from gdb 'bt' command:

#0  0x33e5 in xsputn__9streambufPCci ()
#1  0x34d7 in padn__9streambufci (-1073743264, 48, 1)
#2  0x2400 in vform__9streambufPCcPv ()
#3  0xf27 in vsprintf ()
#4  0xed8 in sprintf ()
#5  0x21b in mktemp ()
#6  0x5858706d in _end ()

I hope that this problem is not a faq. I am using the gcc that comes with
SLS 1.03 (2.4.5?).

hope this helps someone,

Yermo Lamers

 
 
 

mktemp() broken?

Post by Alan C » Thu, 18 Nov 1993 02:13:10



Quote:

>I may have found a linux system library bug.

>The following program causes a segmentation fault on my system:
>Linux SLS 1.03 w/ patch .13 applied on a generic 16MB 486 w/ SCSI disk.

>main()
>{
>mktemp("mktempXXXXXX");
>}

Nothing of the sort. You've found an 'I don't understand some of the more
suprising features of C' effect.

A string in quotes is a constant string. You can't change it and Linux
unlike DOS knows this! Do it properly with

main()
{
        static char temp[]="mktempXXXXXX";
        mktemp(temp);

Quote:}

Alan


 
 
 

1. mktemp broken?

Hi there!

I'm experiencing a strange phenomenon when using mktemp on my RedHat 7.2
box. A simple "mktemp /tmp/test.XXXXX" fails with "Cannot create temp file
/tmp/test.XXXXX". The command isn't that complex that I think I'm doing
anything wrong. Of course I'm able to touch a file in /tmp and there
isn't any file even starting with test in that directory. My glibc is
2.2.4-27 and mktemp is 1.5-11 (doesn't work with 1.5-8 neither).

Any ideas?

TIA
Jan

--
Jan Grobecker, Lehrte (Germany)
mailto:jan(dot)grobecker(at)epost(dot)de - to (spam) protect the innocent ;-)

"We are Tuborg. Abstinence is futile. You will be alcoholated."

2. Communicating with background processes

3. mktemp() broken?

4. Using umask()

5. Make broken, top broken, flock errors, kernel modules broken

6. Help! "No such file or directory" on executing binary.

7. 2.5: ieee1394 still broken, vesafb still broken, ipv6 still broken

8. 'lo' interface sending, but not receiving ?

9. mktemp error?

10. mktemp() create core dump

11. Does mktemp work?

12. mktemp for solaris?

13. Solaris mktemp()