argotorg / argotorg/solidity

[yul] ICE when accessing a Yul data subobject: `Assembly object not found or does not contain code`

Open
#9,470 3 comments 0 reactions 1 assignee Claimed by @0xGeorgii View on GitHub
bug :bug: fuzz blocker low effort medium impact must have should compile without error
Dominant language
C++
Stars
25.7k
Forks
6.2k
Avg merge
1d 11h
Merged PRs (30d)
21

Description

## Description

```
object "t" {
code {
datacopy(not(datasize("object2.object3.object4.datablock")), 0, 0)
}
object "object2" {
code{}
object "object3" {
code{}
object "object4" {
code{}
data "datablock" ""
}
}
}
}
```

throws

https://github.com/ethereum/solidity/blob/4a478f0fb2d8d4f7bc7fdacfeb20e955d5396ce8/libyul/Object.cpp#L110

However

```
object "t" {
code {
datacopy(not(datasize("datablock")), 0, 0)
}
data "datablock" "okay"
}
```

compiles fine. So it seems data identifier is a valid identifier for `datasize/offset` opcode. However, nested data identifiers are not? Perhaps this is under specified?

## Environment

- Compiler version: latest develop

## Steps to Reproduce

```
$ solc --strict-assembly test.yul
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.