DragonFly bugs List (threaded) for 2008-05
DragonFly BSD
DragonFly bugs List (threaded) for 2008-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Qt 4.4 QtConcurrent and libthread_xu

From: "Simon 'corecode' Schubert" <corecode@xxxxxxxxxxxx>
Date: Thu, 08 May 2008 00:04:08 +0200

Aggelos Economopoulos wrote:
In libthread_xu it assumes non-NULL and will crash.

    Try this patch.  It will do the same check that libc_r does.  I'm
    not convinced that Qt isn't broken, though, Qt shouldn't be passing
    NULL to the mutex functions, it should be passing the address of
    a pthread_mutex_t which itself can be NULL, but it should be passing
Still, it's bad form for a library function to crash just because somebody
called it with an obviously invalid argument.
Not sure about that. There are many illeagal pointers that can't be catched
so why treat NULL differently?
Because NULL is guaranteed not to point to an object.

This is true. Fair enough, we can add a check. I still wonder why they are passing NULL in the first place.

And a crash with an obvious stack trace shows that there is a problem that
should be fixed.

While an error of EINVAL is hard to debug?

Yes, most people seem to ignore error messages returned by mutex functions anyways, or so I've heard :)


Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \

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