Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove exit: return idiom from src/inet and src/transport #5914

Closed
wants to merge 2 commits into from

Conversation

kpschoedel
Copy link
Contributor

Problem

The Exit group of error-handling macros inhibit scoping, and
are unnecessary when there is no cleanup at the exit: label.

Summary of Changes

  • Remove exit: return idiom from src/inet and src/transport,
    replacing Exit macros with corresponding Return macros.
  • Incidentally fixed a bug in RawEndPoint::BindInterface and
    UDPEndPoint::BindInterface that could leave the LwIP lock held
    by invoking SuccessOrExit() within a locked section.

#### Problem

The `Exit` group of error-handling macros inhibit scoping, and
are unnecessary when there is no cleanup at the `exit:` label.

#### Summary of Changes

- Remove `exit: return` idiom from src/lib, replacing `Exit` macros
  with corresponding `Return` macros.
- Incidentally fixed a bug in `RawEndPoint::BindInterface` and
  `UDPEndPoint::BindInterface` that could leave the LwIP lock held
  by calling `SuccessOrExit()` within a locked section.
@github-actions
Copy link

github-actions bot commented Apr 9, 2021

Size increase report for "esp32-example-build" from 524bafa

File Section File VM
chip-all-clusters-app.elf .flash.text 1668 1668
chip-all-clusters-app.elf .flash.rodata 1296 1296
chip-all-clusters-app.elf .dram0.bss 0 1016
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-all-clusters-app.elf and ./pull_artifact/chip-all-clusters-app.elf:

sections,vmsize,filesize
.debug_info,0,30401
.debug_line,0,12923
.debug_loc,0,3889
.debug_abbrev,0,2906
.debug_str,0,1858
.flash.text,1668,1668
.flash.rodata,1296,1296
.dram0.bss,1016,0
.strtab,0,543
.debug_frame,0,464
.debug_ranges,0,416
.symtab,0,304
.debug_aranges,0,184
.shstrtab,0,1
.xt.prop._ZN4chip8Encoding22PacketBufferWriterBaseINS0_12LittleEndian12BufferWriterEEC2EONS_6System18PacketBufferHandleEj,0,-1
[Unmapped],0,-1296

Comparing ./master_artifact/chip-pigweed-app.elf and ./pull_artifact/chip-pigweed-app.elf:

sections,vmsize,filesize


@github-actions
Copy link

github-actions bot commented Apr 9, 2021

Size increase report for "nrfconnect-example-build" from 524bafa

File Section File VM
chip-lighting.elf text 204 204
chip-lighting.elf rodata 48 52
chip-lighting.elf device_handles 4 4
chip-lock.elf text 204 204
chip-lock.elf rodata 48 48
chip-lock.elf device_handles 4 4
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-lighting.elf and ./pull_artifact/chip-lighting.elf:

sections,vmsize,filesize
.debug_info,0,15254
.debug_loc,0,3860
.debug_line,0,3460
.debug_abbrev,0,1662
.debug_str,0,1000
.debug_ranges,0,448
.debug_frame,0,388
text,204,204
.symtab,0,176
.strtab,0,159
.debug_aranges,0,104
rodata,52,48
device_handles,4,4
.shstrtab,0,-3

Comparing ./master_artifact/chip-lock.elf and ./pull_artifact/chip-lock.elf:

sections,vmsize,filesize
.debug_info,0,15254
.debug_loc,0,3864
.debug_line,0,3456
.debug_abbrev,0,1662
.debug_str,0,992
.debug_ranges,0,448
.debug_frame,0,388
text,204,204
.symtab,0,176
.strtab,0,159
.debug_aranges,0,104
rodata,48,48
device_handles,4,4
.shstrtab,0,1

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize
.debug_ranges,0,296
.debug_info,0,131
.debug_abbrev,0,79
.debug_loc,0,-172
.debug_line,0,-198


@kpschoedel kpschoedel closed this Apr 9, 2021
@kpschoedel
Copy link
Contributor Author

mismerge needs fixing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant