We have a large program that runs in a normal environment but is failing to run under valgrind and outputting the following before exiting.
==53581== Warning: set address range perms: large range [0x33ea000, 0x28bea000) (defined)
npQueueManager::npQueueManager(int, int)(271) - failed on 'Invalid argument'
2010/08/13 11:14:13.857 al3170-1.opnet.com .libs/mt-hcfestats ERROR MQ-1002: Fail to get share memory of the size initsize
Using the attached test program, shmat() fails under valgrind but not in a normal environment.
This bug sounds very similar to Valgrind Bugs numbers 157665 and 116483.
The output of valgind when running the attached test is presented below.
==53556== Memcheck, a memory error detector
==53556== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==53556== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info
==53556== Command: ./a.out
shmat failed on 'Invalid argument'
==53556== HEAP SUMMARY:
==53556== in use at exit: 4,096 bytes in 1 blocks
==53556== total heap usage: 3 allocs, 2 frees, 4,202 bytes allocated
==53556== LEAK SUMMARY:
==53556== definitely lost: 0 bytes in 0 blocks
==53556== indirectly lost: 0 bytes in 0 blocks
==53556== possibly lost: 0 bytes in 0 blocks
==53556== still reachable: 4,096 bytes in 1 blocks
==53556== suppressed: 0 bytes in 0 blocks
==53556== Rerun with --leak-check=full to see details of leaked memory
==53556== For counts of detected and suppressed errors, rerun with: -v
==53556== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Patch attached with submission follows:
How-To-Repeat: Compile and run the attached test program. Once in under the OS and again using valgrind.
Fix synopsis and assign.
This appears to be a problem in FreeBSD 8.1 as well as FreeBSD 8.0.
stas 2010-10-15 08:07:31 UTC
FreeBSD ports repository
devel/valgrind Makefile distinfo
- Fix shmat syscall wrapper .
- Implement shmctl syscall wrapper.
PR: ports/149621 
Submitted by: Stephen Sanders <email@example.com> 
Revision Changes Path
1.43 +2 -2 ports/devel/valgrind/Makefile
1.8 +3 -3 ports/devel/valgrind/distinfo
firstname.lastname@example.org mailing list
To unsubscribe, send any mail to "email@example.com"
Fixed in revision 4.