[MOAB-dev] NAME_TAG_SIZE value?

Jason Kraftcheck kraftche at cae.wisc.edu
Mon Sep 27 16:23:06 CDT 2010


On 09/27/2010 04:20 PM, Jason Kraftcheck wrote:
> On 09/27/2010 04:09 PM, Tim Tautges wrote:
>> Ok, go ahead and set it to 64.  But, also run the code through valgrind
>> to make sure it isn't something else, it can be dangerous doing string
>> reads/writes (buffer overflows, etc.).
>>
> 
> This may have some unpleasant side effects.  If the tag is created by a file
> read, then you'll have a situation where the constant is 64 but the actual
> tag size is 32.  If the tag is created by MOAB first, then attempts to read
> files also containing the tag will fail because of the size mismatch.
> 

Some solutions:
  1) Make sure that MOAB always creates the tag and add special cases to
     all readers to gracefully handle increasing tag size for that tag.
  2) Also change the tag name so that it is a new tag with the new size.
     (This is least likely to break applications using the tag values.)
  3) Fix the cub file reader such that it truncates names that are too
     long.  (This should be done anyway, even if it isn't an acceptable
     solution to this problem.)

- jason


More information about the moab-dev mailing list