2519 – Segfault when >> used in an invalid slice

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 2519 - Segfault when >> used in an invalid slice
Summary: Segfault when >> used in an invalid slice
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 Windows
: P2 normal
Assignee: Walter Bright
URL:
Keywords: ice-on-invalid-code
Depends on:
Blocks:
Reported: 2008年12月17日 02:15 UTC by Don
Modified: 2014年02月24日 15:32 UTC (History)
0 users

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Don 2008年12月17日 02:15:05 UTC
A one-liner. Applies to << and >>> as well.
Happens in both D1.038 and D2.022; not a recent regression (happens in D1.030 as well). Happens every time there's an invalid slice with >> in it.
---
int x = x[0..x>>1];
---
//bug.d(1): Error: int cannot be sliced with []
//SEGFAULT
Comment 1 Don 2009年02月03日 08:01:20 UTC
Fixed D1.039


AltStyle によって変換されたページ (->オリジナル) /