|
|
## Glue code generation
|
|
|
|
|
|
Glue code is generated for each module. This is where the names of the files are generated in `main/main.cpp` (they are appended with the original name of the module):
|
|
|
|
... | ... | @@ -5,4 +6,42 @@ Glue code is generated for each module. This is where the names of the files are |
|
|
std::string callee_h = new_name(m->identifier(), std::string("_callee.h"));
|
|
|
std::string callee_c = new_name(m->identifier(), std::string("_callee.c"));
|
|
|
...
|
|
|
``` |
|
|
\ No newline at end of file |
|
|
```
|
|
|
|
|
|
## Issues
|
|
|
|
|
|
### `fsanitize` in `Makefile`
|
|
|
|
|
|
*Monday 29 October 2018*
|
|
|
|
|
|
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
|
|
|
`nullnet-require.idl`
|
|
|
```c
|
|
|
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
|
|
|
}
|
|
|
``` |