Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 349505

Summary: static only policy should allow runtime constructs
Product: [Technology] RTSC Reporter: Alan DeMars <ademars>
Component: CoreAssignee: Dave Russo <d-russo>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: d-russo, karl, sg
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: target:3.23

Description Alan DeMars CLA 2011-06-15 17:08:39 EDT
Build Identifier: 3.22.01

The intent of static only is to eliminate Memory_alloc() from the code footprint. However, an implementation side effect of this setting is that Object_construct() isn't available when it should be.

Reproducible: Always
Comment 1 Dave Russo CLA 2011-08-01 10:34:27 EDT
*** Bug 353259 has been marked as a duplicate of this bug. ***
Comment 2 Dave Russo CLA 2011-08-01 10:40:17 EDT
As it stands today, Mod_construct() throws an error when used in a static only
system:
    o both Mod_create() and Mod_construct() reference a configuration generated
      function: Mod_Object__create__S
    o in static only configurations this generated function simply throws an 
      error: "create policy error"
    o in create or delete policy configurations this generated function call
      first calls xdc.runtime.Core.createObject() then calls the module's 
      instance init function

To support modules that want to allow construct to be used in static-only
systems we can:
    o for static-only configurations, change the config generated create 
      functions for modules to 
          1. throw an error if NULL is passed for the object's space
          2. call a simpler xdc.runtime.Core.constructObject() which has no
             reference to Memory allocation functions, but
          3. otherwise behaves identically to the function currently generated 
             for create-policy configurations.
      And change destruct functions to
          1. call a simpler xdc.runtime.Core.destructObject() which has no
             reference to Memory allocation functions,
    o for all other configurations, the generated create and delete functions
      would be unchanged from their current implementation.
Comment 3 Dave Russo CLA 2011-08-01 10:45:24 EDT
*** Bug 334726 has been marked as a duplicate of this bug. ***
Comment 4 Dave Russo CLA 2011-08-04 18:23:46 EDT
fixed in r1466 (xdc-y*)

Added @InstanceInitStatic attribute to identify modules that support construct in STATIC_POLICY memoryPolicy configurations.

Allow _destruct in create policy configurations.

Added necessary Core functions referenced by new config stubs
Comment 5 Dave Russo CLA 2011-11-15 11:17:53 EST
Fixed (in r1557) Mod_Params_init to call Core_assignParams__I() for modules that support construct in static-only policy.  Normally in static policy config, this function is never needed and so we were careful to never reference it.  But now that we allow construct in static only systems (for select modules), we need to make sure we call this function; otherwise module params will not be properly initialized.
Comment 6 Karl Wechsler CLA 2011-11-16 17:35:58 EST
verify pass.  I had a test case that was failing and verified that it works correctly with BIOS 6.33.00.18_eng and XDC 3.23.00.30_eng.   I added test case to regresstest (SDOCM00083330.c/cfg) to make sure this gets tested with our automated regressions.

verify pass.
Comment 7 Dave Russo CLA 2011-11-24 12:27:50 EST
XDCtools 3.23.00.32 is now available