Skip to content

assert with out-of-line template member function definition #6835

Closed

Description

Description
An out-of-line template member function definition triggers an assert (in an assert enabled build of DXC) with an invalid heap pointer. A release build does not show any issues, although it is possible the heap pointer is still invalid but not detected so could cause latent issues.

Steps to Reproduce
This appears to occur with all out-of-line function definitions - a simple example is given below. Compile with -T lib_6_8

template< typename T >
class C {
void f();
};

template< typename T >
void C< T >::f() { }

Actual Behavior
Assert triggered.

Environment

  • DXC version : dxcompiler.dll: 1.8 - 1.8.0.14690 (main, 9ef0481) (also seen on other versions)
  • Host Operating System : Windows 10 Pro 22H2 (also observed on Windows 11)

Activity

  1. added
    bug
    needs-triage
    on Jul 30, 2024
  2. added
    incorrect-code
    and removed
    needs-triage
    on Jul 30, 2024
  3. damyanp commented on Jul 30, 2024

    @damyanp
    Member

    Tim Corringham (@tcorringham) - are you working on this one as well? If so we can assign it to you. Thanks!

  4. tcorringham commented on Aug 1, 2024

    @tcorringham
    CollaboratorAuthor

    I may not have time to look at this for a while, so I won't claim it until I do have time - just in case someone else wants to tackle it.

  5. tcorringham commented on Apr 21, 2026

    @tcorringham
    CollaboratorAuthor

    I finally revisited this issue, and it no longer occurs so I am closing it.
    The changes(s) that resolved it isn't obvious, but given the time since this was raised that is to be expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugincorrect-code

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions