diff options
| author | Alexey Tarasov <tarasov@dodologics.com> | 2017-08-20 21:35:00 +1000 |
|---|---|---|
| committer | Alexey Tarasov <tarasov@dodologics.com> | 2017-08-23 23:10:03 +1000 |
| commit | e13090e8b2f8adce9277f2ebfa37efa75c8837a8 (patch) | |
| tree | f7cee317cf6ed47503d3ee921d0615cd977027cf /src/libstd/sys/unix/process/process_unix.rs | |
| parent | a3f0ee9a7b17d522bfc6385f841d040445730f28 (diff) | |
| download | rust-e13090e8b2f8adce9277f2ebfa37efa75c8837a8.tar.gz rust-e13090e8b2f8adce9277f2ebfa37efa75c8837a8.zip | |
Fixes issue #43205: ICE in Rvalue::Len evaluation.
- fixes evaluation of array length for zero-sized type referenced by rvalue operand. - adds test to verify fix. Cause of the issue. Zero-sized aggregates are handled as operands, not lvalues. Therefore while visiting Assign statement by LocalAnalyser, mark_as_lvalue() is not called for related Local. This behaviour is controlled by rvalue_creates_operand() method. As result it causes error later, when rvalue operand is evaluated in trans_rvalue_operand() while handling Rvalue::Len case. Array length evaluation invokes trans_lvalue() which expects referenced Local to be value, not operand. How it is fixed. In certain cases result of Rvalue::Len can be evaluated without calling trans_lvalue(). Method evaluate_array_len() is introduced to handle length evaluation for zero-sized types referenced by Locals.
Diffstat (limited to 'src/libstd/sys/unix/process/process_unix.rs')
0 files changed, 0 insertions, 0 deletions
