[LLVMbugs] [Bug 15702] New: Address sanitizer: setrlimit() fails
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Apr 8 10:53:59 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=15702
Bug ID: 15702
Summary: Address sanitizer: setrlimit() fails
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: martin at infinio.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
The following code:
#include <sys/resource.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
int main()
{
struct rlimit r;
r.rlim_cur = RLIM_INFINITY;
r.rlim_max = RLIM_INFINITY;
int ret = setrlimit(RLIMIT_CORE, &r);
fprintf(stderr, "ret: %d, errno: %d, message: %s\n", ret, errno,
strerror(errno));
return 0;
}
Fails with EPERM when run with the address sanitizer:
$ clang -fsanitize=address ./setrlimit.c && ./a.out
ret: -1, errno: 1, message: Operation not permitted
But fine when run without:
$ clang ./setrlimit.c && ./a.out
ret: 0, errno: 0, message: Success
Trunk from today:
clang version 3.3 (179025)
Target: x86_64-unknown-linux-gnu
Thread model: posix
On Ubuntu 12.10.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130408/4683fd70/attachment.html>
More information about the llvm-bugs
mailing list