[haiku-commits] Re: haiku: hrev53378 - in src: system/kernel/vm kits/media

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 15 Aug 2019 16:15:11 +0200

Am 15/08/2019 um 02:13 schrieb waddlesplash:

72b37d9ffc7e: kernel: Turn the clone-area-attempt panic into a dprintf.
        if (!kernel && sourceAddressSpace != targetAddressSpace
                && (sourceArea->protection & B_CLONEABLE_AREA) == 0) {
-               // kernel areas must not be cloned in userland, unless 
-               // declared user-cloneable upon construction
  #if KDEBUG
-               panic("attempting to clone area \"%s\" (%" B_PRId32 ")!",
-                       sourceArea->name, sourceID);
+               Team* team = thread_get_current_thread()->team;
+               dprintf("team \"%s\" (%" B_PRId32 ") attempted to clone area \"%s\" 
+                       B_PRId32 ")!\n", team->Name(), team->id, 
sourceArea->name, sourceID);

That's not really such a good idea IMO.
First of all, the comment was not updated when the semantics of this check changed.
Then, it may make sense to only dprintf() for userland areas for now (if only because this would break compatibility otherwise), but for kernel areas, I would insist on keeping the panic.


Other related posts: