[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#480433: libc6.1: mkdtemp on ia64 can return xa non null pointer not pointing at the template



On Fri, May 09, 2008 at 05:46:21PM -0600, Alan Bain wrote:
> Affects IA64 only
> 
> Code like...
> static char buf[20];
> strcpy(buf, "/tmp/some_XXXXXX");
> char * tmpname=mkdtemp(buf);

Please provide a minimal, compiling and known to fail testcase. The following
testcase works as expected:

| merulo% cat test.c
| #define _GNU_SOURCE 1
| 
| #include <stdlib.h>
| #include <stdio.h>
| #include <string.h>
| 
| int main()
| {
|   static char buf[20];
|   strcpy(buf, "/tmp/some_XXXXXX");
|   char * tmpname=mkdtemp(buf);
|   printf("%s (%p)\n", buf, buf);
|   printf("%s (%p)\n", tmpname, tmpname);
| }
| merulo% uname -a
| Linux merulo 2.6.18-dsa-mckinley #1 SMP Mon Feb 11 09:57:09 MST 2008 ia64 GNU/Linux
| merulo% dpkg -s libc6.1-dev | grep Version
| Version: 2.7-10
| merulo% gcc -o test test.c
| merulo% ./test 
| /tmp/some_mCgeUd (0x6000000000000fc0)
| /tmp/some_mCgeUd (0x6000000000000fc0)
| merulo% rmdir /tmp/some_mCgeUd 

Bastian

-- 
I have never understood the female capacity to avoid a direct answer to
any question.
		-- Spock, "This Side of Paradise", stardate 3417.3



Reply to: