Skip to content

Check for bad parameters on long vector type#4200

Open
dneto0 wants to merge 1 commit intoKhronosGroup:mainfrom
dneto0:fix-vector
Open

Check for bad parameters on long vector type#4200
dneto0 wants to merge 1 commit intoKhronosGroup:mainfrom
dneto0:fix-vector

Conversation

@dneto0
Copy link
Copy Markdown
Contributor

@dneto0 dneto0 commented Mar 27, 2026

Bug: crbug.com/486238211

@dneto0
Copy link
Copy Markdown
Contributor Author

dneto0 commented Mar 27, 2026

cc: @dnovillo @jeffbolznv

@dnovillo dnovillo self-requested a review March 30, 2026 13:26
vector<float, 5, 7> excessCount;

vector() yep;
vector<void,5>() oof;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't access the original crbug (is there a way to change that?), but I don't think this will exercise the null-dereference. The vector() yep will produce a syntax error and it supresses any other diagnostics. Maybe something like this?

float a = vector<float>(0);
float b = vector<float,5,7>(0);

bool isTensorViewNV() const { return basicType == EbtTensorViewNV; }

const TTypeParameters* getTypeParameters() const { return typeParameters; }
const TArraySizes* getArraySizes() const { return arraySizes; }
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getArraySizes does not seem to be called anywhere. Remove?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants