[Y-devel] [Fwd: [Bug 8] New: [moduleLoad] dlsym() error tested in unusual way]

Matthew David Kurjanowicz mkurjano at cc.gatech.edu
Sun Mar 7 05:16:47 GMT 2004


Not sure if the list got this...
-MK
-------- Original Message --------
Subject: [Bug 8] New: [moduleLoad] dlsym() error tested in unusual way
From: bugzilla-daemon at y-win-wiki.jciteassist.org
Date: Fri, March 5, 2004 9:12 pm
To: mkurjano at cc.gatech.edu

https://y-win-wiki.jciteassist.org/bugzilla/show_bug.cgi?id=8

           Summary: [moduleLoad] dlsym() error tested in unusual way
Product: Y-Windows
           Version: DEVEL
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: trivial
          Priority: P4
         Component: Server
        AssignedTo: mkurjano at cc.gatech.edu
        ReportedBy: pitrp at wg78.de
         QAContact: y-devel at www.y-windows.org
                CC: y-devel at www.y-windows.org


dlsym() return value is used to determinate if an error occured.
Though this should be enough in the situation where it is used, it is
not the recommended way of testing for errors because a symble coule
have a value of NULL that would break the code (not in this
circumstances though).

y/module/module.c:104:ff
-------
  if (moduleInitialiseFunction == NULL)
    {
      Y_ERROR ("Module: Failed to find initialise for %s: %s\n",
               moduleName, dlerror ());
      yfree (module);
      return;
    }
-------
should probably be:
-------
  char *error;
  if ((error = dlerror()) != NULL)
    {
      Y_ERROR ("Module: Failed to find initialise for %s: %s\n",
               moduleName, error);
      yfree (module);
      return;
    }
-------



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.






More information about the Y-devel mailing list









2026 © www.Y-Windows.Org - All Rights Reserved