MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0013114 | CMake | CPack | public | 2012-04-09 13:23 | 2016-06-10 14:31 |
Reporter | Cesar | ||||
Assigned To | Kitware Robot | ||||
Priority | urgent | Severity | block | Reproducibility | always |
Status | closed | Resolution | moved | ||
Platform | x86 | OS | Solaris | OS Version | any |
Product Version | CMake 2.8.7 | ||||
Target Version | Fixed in Version | ||||
Summary | 0013114: CPack segfaults if too many people belong to a certain group | ||||
Description | CPack, when trying to generate a TGZ package, segfaults in lookup_gname_helper when there are too many people in the GID it is trying to identify. My builds started failing immediately after that number was reached when IT added a new member to the staff group. The realloc in case of ERANGE segfaults. If I increase the buffer size to something larger by hand and recompile it works. CPack is not the first to run into this issue: https://issues.apache.org/bugzilla/show_bug.cgi?id=41105 [^] | ||||
Steps To Reproduce | Run CPack to generate TGZs as a user belonging to a group containing "too many people". Also, the file in "addidional information" reproduces the problem every time for our 5000 gid. If I increase the initial bufsize to 1024 it works. It is a Solaris only problem, as our other platforms (Linux, Windows, Mac) work fine. | ||||
Additional Information | #define _POSIX_PTHREAD_SEMANTICS #include <grp.h> #include <iostream> int main(void) { struct group grent, *result; result = &grent; int bufsize=512; char* buffer=(char*)malloc(bufsize); for(;;) { int status = getgrgid_r(5000, &grent,buffer,bufsize,&result); if(!status) { std::cerr << "Buffer: " << buffer << std::endl; break; } else if(status==34) { std::cerr << "Small buffer\n"; bufsize*=2; buffer=(char*)realloc(buffer,bufsize); } } return 0; } | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2012-04-09 13:23 | Cesar | New Issue | |||
2012-04-09 14:32 | Cesar | Note Added: 0029106 | |||
2012-04-09 14:39 | Cesar | Note Added: 0029107 | |||
2012-04-13 11:49 | Eric NOULARD | Note Added: 0029148 | |||
2012-08-11 21:35 | David Cole | Status | new => backlog | ||
2012-08-11 21:35 | David Cole | Note Added: 0030402 | |||
2016-06-10 14:28 | Kitware Robot | Note Added: 0042020 | |||
2016-06-10 14:28 | Kitware Robot | Status | backlog => resolved | ||
2016-06-10 14:28 | Kitware Robot | Resolution | open => moved | ||
2016-06-10 14:28 | Kitware Robot | Assigned To | => Kitware Robot | ||
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|