Bug 13966 – [REG2.067a] dmd: expression.c:3761: size_t StringExp::length(int): Assertion `encSize == 1 || encSize == 2 || encSize == 4' failed.

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-01-10T15:32:00Z
Last change time
2015-02-18T03:42:17Z
Keywords
ice, pull
Assigned to
nobody
Creator
destructionator

Comments

Comment #0 by destructionator — 2015-01-10T15:32:36Z
See here: http://forum.dlang.org/thread/[email protected]?page=2#post-qpmserhpzkbsmbcudnzk:40forum.dlang.org I don't have a reduced test case, just the assertion line from the post that I don't want to lose.
Comment #1 by sinkuupump — 2015-01-10T16:14:56Z
DustMite found that ICE happens in dom.d at current.attributesIncludesSeparatedBySpaces ~= ["class", token]; where 'attributesIncludesSeparatedBySpaces' is string[2][]. void test() { string[1][] arr; arr ~= ["class"]; // ICE }
Comment #2 by k.hara.pg — 2015-01-10T16:32:39Z
(In reply to sinkuupump from comment #1) > DustMite found that ICE happens in dom.d at > > current.attributesIncludesSeparatedBySpaces ~= ["class", token]; > > where 'attributesIncludesSeparatedBySpaces' is string[2][]. > > > void test() { > string[1][] arr; > arr ~= ["class"]; // ICE > } The reduced case was much helpful to me. Thanks! https://github.com/D-Programming-Language/dmd/pull/4276
Comment #3 by github-bugzilla — 2015-01-11T01:19:18Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/6e10ec1351331f3c66fb7db1886c7c39979fd9af fix Issue 13966 - dmd: expression.c:3761: size_t StringExp::length(int): Assertion `encSize == 1 || encSize == 2 || encSize == 4' failed. https://github.com/D-Programming-Language/dmd/commit/fa4ae8023905f48996bed6eb001938c4e7db151f Merge pull request #4276 from 9rnsr/fix13966 [REG2.067a] Issue 13966 - dmd: expression.c:3761: size_t StringExp::length(int):Assertion `encSize == 1 || encSize == 2 || encSize == 4' failed.
Comment #4 by github-bugzilla — 2015-02-18T03:42:17Z
Commits pushed to 2.067 at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/6e10ec1351331f3c66fb7db1886c7c39979fd9af fix Issue 13966 - dmd: expression.c:3761: size_t StringExp::length(int): Assertion `encSize == 1 || encSize == 2 || encSize == 4' failed. https://github.com/D-Programming-Language/dmd/commit/fa4ae8023905f48996bed6eb001938c4e7db151f Merge pull request #4276 from 9rnsr/fix13966