microsoft / microsoft/DirectXShaderCompiler

int f(int) as /E results in "Internal compiler error: access violation. Attempted to read from address 0x0000000000000018"

Open
#4,965 12 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug incorrect-code
Dominant language
C++
Stars
3.7k
Forks
900
Avg merge
2d 11h
Merged PRs (30d)
44

Description

this input program:

int f( int)
{
    return 0 ;
}

int a;
static int b = f ( a) ;

options:
/T ps_6_2 /E f

causes
either:

Internal compiler error: access violation. Attempted to read from address 0x0000000000000018

either:

error: llvm::cast() argument of incompatible type!

randomly.

dxc versions tested: 1.6.x and 1.7.2212.12

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the supplied C input with /T ps_6_2 /E f using the tested dxc versions and compare the two reported failures. Trace the compiler path reached by this entry-point and determine the expected behavior; done means the input no longer causes an access violation or incompatible-type assertion.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.