Announcement

Collapse
No announcement yet.

tiobench bug with recent stdlib.h

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • tiobench bug with recent stdlib.h

    As it appears was mentioned around 9 months ago in this forum, the pts/tiobench-1.1.0 test will not build on newer Linuxes due to a function name conflict with stdlib.h. I looked around and couldn't find any obvious place to submit upstream reports/fixes for tiobench (in fact, I couldn't find any sign of any recent development at all.. the project seems to be stagnant/abandoned?), so I figured I would at least submit this here..

    I have a patch (based on http://www.mail-archive.com/pld-cvs-...msg303059.html) which can be applied prior to building in order to fix this issue. Would it be possible to add this to the PTS installer for this test somehow?

    Code:
    --- tiobench-0.3.3/tiotest.c.orig	2013-06-14 21:46:33.240752868 -0700
    +++ tiobench-0.3.3/tiotest.c	2013-06-14 21:46:45.268752804 -0700
    @@ -31,7 +31,7 @@
     */
     ArgumentOptions args;
     
    -static void * aligned_alloc(ssize_t size)
    +static void * tio_aligned_alloc(ssize_t size)
     {
     	caddr_t a;
     	a = mmap((caddr_t )0, size, 
    @@ -281,7 +281,7 @@
     		pthread_attr_setscope(&(d->threads[i].thread_attr),
     				      PTHREAD_SCOPE_SYSTEM);
     
    -		d->threads[i].buffer = aligned_alloc( d->threads[i].blockSize );
    +		d->threads[i].buffer = tio_aligned_alloc( d->threads[i].blockSize );
     		if( d->threads[i].buffer == NULL )
     		{
     			perror("Error allocating memory");
Working...
X