On Sat, Aug 02, 2008 at 09:31:44AM -0700, Allison Randal via RT wrote: > > Committed a fix to tcl in branch (r29940) to pull from the correct > > slot. All tests now pass. I'd like to see this segfault/assert/boom > > addressed before we merge back, just in case. > > Resolved in r29941, by throwing an exception when requesting an > attribute that doesn't exist, or an attribute assigned to the wrong > register type (an integer value assigned to a string register, for > example). Added example code as regression test in r29942.
Out of curiosity, other symbol-like lookups such as get_global and hash lookups tend to return NULL when they don't exist, as opposed to throwing an exception. For consistency, should looking up a non-existent attribute do the same? A similar issue exists in RT #47894, where looking up a non-existent lexical throws an exception instead of returning NULL. I can envision arguments for having lexicals and attributes act differently from other symbols, but I did want to double-check that we really want C<getattribute> to act differently from C<get_global>. Pm