Update IDL Compiler Documentation authored by Aftab Hussain's avatar Aftab Hussain
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
- [Peg syntax](#peg-syntax) - [Peg syntax](#peg-syntax)
- [Parser code generation](#parser-code-generation) - [Parser code generation](#parser-code-generation)
- [Glue code generation](#glue-code-generation) - [Glue code generation](#glue-code-generation)
- [Issues](#issues)
- [Test IDL samples](#test-idl-samples) - [Test IDL samples](#test-idl-samples)
# <a name="peg-syntax"></a> Peg Syntax [⬆](#jump-to-section) # <a name="peg-syntax"></a> Peg Syntax [⬆](#jump-to-section)
...@@ -58,66 +57,6 @@ Glue code is generated for each module. This is where the names of the files are ...@@ -58,66 +57,6 @@ Glue code is generated for each module. This is where the names of the files are
... ...
``` ```
## <a name="issues"></a> Issues [⬆](#jump-to-section)
1. [Always asks for an rpc.](#issue-1)
2. [Does not detect an rpc, when require is put.](#issue-2)
3. [fsanitize in Makefile leads to a flurry of indirect leaks.](#issue-3) **IGNORE NOW**
### 1. <a name="issue-1"></a> Always asks for an rpc.
If the line with the rpc statement is not there, we get a segfault in
main.cpp:144: `ccst_caller_h->write(ofs_caller_h, 0);`
while giving no rpcs is okay with the grammer (`Rpc*`), the code
does not handle such a case. It always expects rpcs.
```c
include <kernel.idl>
module nullnet(channel c) {
channel net_async = new async(c);
use net_async;
{
projection <struct device> device {
}
projection <struct net_device_ops> net_device_ops {
rpc int (*open)(projection device *dev);
}
}
}
```
### 2. <a name="issue-2"></a> Does not detect an rpc, when require is put.
```c
include <kernel.idl>
module nullnet(channel c) {
channel net_async = new async(c);
use net_async;
{
projection <struct device> device {
}
projection <struct net_device_ops> net_device_ops {
rpc int (*open)(projection device *dev);
}
}
require kernel
}
```
### 3. <a name="issue-3"></a> fsanitize in Makefile leads to a flurry of indirect leaks.
If `fsanitize` option is used in `Makefile`:
```
CXXFLAGS = -g -fno-omit-frame-pointer -I include/ -fsanitize=address
```
we get lots of indirect leaks reported in the output for `nullnet-require.idl` (without the `require` line). Without this option, the output does not report any problems:
```
...
SUMMARY: AddressSanitizer: 140005 byte(s) leaked in 1624 allocation(s).
```
## Test IDL samples [⬆](#jump-to-section) ## Test IDL samples [⬆](#jump-to-section)
`nullnet-require.idl` `nullnet-require.idl`
```c ```c
... ...
......