Problem Note 45200: The FDSTART option of the ARG statement might generate an incorrect argument list and thus cause errors
The FDSTART option of the ARG statement in a SASCBTBL argument definition table for calling DLLs from SAS allows grouping arguments as "structures" to a C language routine. However, when certain combinations of argument types are used this way, the argument list to be passed can be generated incorrectly, such as passing null pointers that can cause a program tp stop.
Click the Hot Fix tab in this note to access the hot fix for this issue.
After the hot fix is in place, you also must bracket the argument structures with a new FDEND token to delineate the structure's end. An example of a SASCBTBL so modified is shown below:
routine fe2test
minarg=8
maxarg=8
returns=long;
arg 1 update char byaddr format=$cstr32.;
arg 2 input char byaddr format=$cstr32.;
arg 3 input num byvalue format=ib4.;
arg 4 update num fdstart fdend format=ib4.;
arg 5 update num fdstart format=ib4.;
arg 6 update num format=ib4.;
arg 7 update num format=ib4.;
arg 8 update num fdend format=ib4.;
In this example, there are 2 aggregates, such that the called routine has 5 arguments: arguments 1 and 2 are "by address," argument 3 is passed "by value," argument 4 is an "aggregate" of one numeric, and, finally, argument 5 is an aggregate of 4 numerics.
Operating System and Release Information
SAS System | Base SAS | Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.21 | 9.3_M2 | 9.2 TS2M3 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.21 | 9.3_M2 | 9.2 TS2M3 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.21 | 9.3_M2 | 9.2 TS2M3 | 9.3 TS1M0 |
Microsoft Windows XP 64-bit Edition | 9.21 | 9.3_M2 | 9.2 TS2M3 | 9.3 TS1M0 |
Microsoft® Windows® for x64 | 9.21 | 9.3_M2 | 9.2 TS2M3 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Datacenter Edition | 9.21 | 9.3_M2 | 9.2 TS2M3 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Enterprise Edition | 9.21 | 9.3_M2 | 9.2 TS2M3 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Standard Edition | 9.21 | 9.3_M2 | 9.2 TS2M3 | 9.3 TS1M0 |
Microsoft Windows Server 2003 for x64 | 9.21 | 9.3_M2 | 9.2 TS2M3 | 9.3 TS1M0 |
Microsoft Windows Server 2008 | 9.21 | 9.3_M2 | 9.2 TS2M3 | 9.3 TS1M0 |
Microsoft Windows Server 2008 for x64 | 9.21 | 9.3_M2 | 9.2 TS2M3 | 9.3 TS1M0 |
Microsoft Windows XP Professional | 9.21 | 9.3_M2 | 9.2 TS2M3 | 9.3 TS1M0 |
Windows 7 Enterprise 32 bit | 9.21 | 9.3_M2 | 9.2 TS2M3 | 9.3 TS1M0 |
Windows 7 Enterprise x64 | 9.21 | 9.3_M2 | 9.2 TS2M3 | 9.3 TS1M0 |
Windows 7 Home Premium 32 bit | 9.21 | 9.3_M2 | 9.2 TS2M3 | 9.3 TS1M0 |
Windows 7 Home Premium x64 | 9.21 | 9.3_M2 | 9.2 TS2M3 | 9.3 TS1M0 |
Windows 7 Professional 32 bit | 9.21 | 9.3_M2 | 9.2 TS2M3 | 9.3 TS1M0 |
Windows 7 Professional x64 | 9.21 | 9.3_M2 | 9.2 TS2M3 | 9.3 TS1M0 |
Windows 7 Ultimate 32 bit | 9.21 | 9.3_M2 | 9.2 TS2M3 | 9.3 TS1M0 |
Windows 7 Ultimate x64 | 9.21 | 9.3_M2 | 9.2 TS2M3 | 9.3 TS1M0 |
Windows Vista | 9.21 | 9.3_M2 | 9.2 TS2M3 | 9.3 TS1M0 |
Windows Vista for x64 | 9.21 | 9.3_M2 | 9.2 TS2M3 | 9.3 TS1M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Problem Note |
Priority: | high |
Date Modified: | 2012-02-03 08:53:06 |
Date Created: | 2011-12-21 09:21:34 |