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

Possible memory leak in RIOT/build/pkg/ndn-riot/app.c #15638

Closed
tluio opened this issue Dec 15, 2020 · 4 comments · Fixed by #19612
Closed

Possible memory leak in RIOT/build/pkg/ndn-riot/app.c #15638

tluio opened this issue Dec 15, 2020 · 4 comments · Fixed by #19612
Assignees
Labels
Area: network Area: Networking Area: pkg Area: External package ports Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Comments

@tluio
Copy link

tluio commented Dec 15, 2020

I run make in the directory examples/ndn-ping and get some files in the directory build/pkg/ndn-riot which includes app.c.
I guess there is a memory-leak bug in the function ndn_app_register_prefix2 if it returns on line 570.

@benpicco
Copy link
Contributor

That would be a bug in https://github.com/named-data-iot/ndn-riot then.
Can you please also report it upstream?

@tluio
Copy link
Author

tluio commented Dec 18, 2020

Ok, I have reported it upstream just now (named-data-iot/ndn-riot#15).

@cgundogan
Copy link
Member

My understanding is that ndn-riot is not maintained anymore, as ndn-lite is the replacement project. @yan-foto and @tianyuan129 might know more on this?

@yan-foto
Copy link

@cgundogan yes, that's correct! ndn-lite as the generic library of NDN for IoT devices also has a RIOT port which is fairly outdated. Me and @Pairarma have been updating and simplyfing the port (see my fork) and @Pairarma has also initiated an effort to remove GNRC from our port (see here).

As soon as we have the non-GNRC version up and running, we will send a PR!

@jeandudey jeandudey added the Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) label Mar 20, 2021
@aabadie aabadie added Area: network Area: Networking Area: pkg Area: External package ports labels May 20, 2021
@MrKevinWeiss MrKevinWeiss added this to the Release 2021.07 milestone Jun 21, 2021
@MrKevinWeiss MrKevinWeiss removed this from the Release 2021.07 milestone Jul 15, 2021
maribu added a commit to maribu/RIOT that referenced this issue May 18, 2023
Upstream [1] has seen no activity since 2018 and the web server h, so it safe to assume this
is dead. It should be save to assume that any users - if there ever were
any - have moved on.

Fixes RIOT-OS#15638

[1]: https://github.com/named-data-iot/ndn-riot
maribu added a commit to maribu/RIOT that referenced this issue May 20, 2023
Upstream [1] has seen no activity since 2018 and the web server h, so it safe to assume this
is dead. It should be save to assume that any users - if there ever were
any - have moved on.

Fixes RIOT-OS#15638

[1]: https://github.com/named-data-iot/ndn-riot
maribu added a commit to maribu/RIOT that referenced this issue May 20, 2023
Upstream [1] has seen no activity since 2018 and the web server h, so it safe to assume this
is dead. It should be save to assume that any users - if there ever were
any - have moved on.

Fixes RIOT-OS#15638

[1]: https://github.com/named-data-iot/ndn-riot
maribu added a commit to maribu/RIOT that referenced this issue May 21, 2023
Upstream [1] has seen no activity since 2018 and the web server h, so it safe to assume this
is dead. It should be save to assume that any users - if there ever were
any - have moved on.

Fixes RIOT-OS#15638

[1]: https://github.com/named-data-iot/ndn-riot
bors bot added a commit that referenced this issue May 23, 2023
19335: ipv6/nib: 6LBR should not send RS on their downstream interface r=fabian18 a=fabian18



19581: cpu/samd5x: enable FDPLL1 at 200MHz r=benpicco a=dylad

### Contribution description

This PR allows to use the second FDPLL (the first one is used to generated the 120MHz frequency used by the core and some peripherals). The second FDPLL is setup to run at 200MHz which is the maximum allowed by this MCU.
In fact, I reused the existing function which setup FDPLL0 so it can be used in a generic way for both PLL (since they are the same IP).

I change the way the computation offset (left shift by 5)  is done because 200MHz << 5 wouldn't fit inside an `uint32_t` and I wanted to avoid using an `uint64_t` here

Two additional commits are present for a small cleanup and a fix.

This is currently unused in our codebase, so it shouldn't impact this platform too much as the `ONDEMAND` bit is set. the FDPLL will not be running out of the box. But `@gschorcht` might need it pretty soon.

### Testing procedure

This PR can be tested on a `same54-xpro` and an oscilloscope using the following the patch:
```
From 76490845ec72387b24116bdd364a61365c186aa1 Mon Sep 17 00:00:00 2001
From: Dylan Laduranty <dylan.laduranty@mesotic.com>
Date: Thu, 11 May 2023 17:42:16 +0200
Subject: [PATCH] removeme! for debug purpose

Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
---
 cpu/samd5x/cpu.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/cpu/samd5x/cpu.c b/cpu/samd5x/cpu.c
index f778991a5b..2866c8c9e5 100644
--- a/cpu/samd5x/cpu.c
+++ b/cpu/samd5x/cpu.c
`@@` -220,7 +220,7 `@@` static void fdpll_init(uint8_t idx, uint32_t f_cpu)
 }
 
 static void gclk_connect(uint8_t id, uint8_t src, uint32_t flags) {
-    GCLK->GENCTRL[id].reg = GCLK_GENCTRL_SRC(src) | GCLK_GENCTRL_GENEN | flags | GCLK_GENCTRL_IDC;
+    GCLK->GENCTRL[id].reg = GCLK_GENCTRL_SRC(src) | GCLK_GENCTRL_GENEN | flags | GCLK_GENCTRL_OE | GCLK_GENCTRL_IDC;
     while (GCLK->SYNCBUSY.reg & GCLK_SYNCBUSY_GENCTRL(id)) {}
 }
 
`@@` -384,6 +384,12 `@@` void cpu_init(void)
     dma_init();
 #endif
 
+    sam0_gclk_enable(SAM0_GCLK_200MHZ);
+    /* output both FDPLL (GCLK0 and GCLK4) to gpios */
+    gpio_init_mux(GPIO_PIN(PB, 14), GPIO_MUX_M);
+    gpio_init_mux(GPIO_PIN(PB, 10), GPIO_MUX_M);
+    /* PB14 -> EXT2    PB10 -> QSPI SCK */
+
     /* initialize stdio prior to periph_init() to allow use of DEBUG() there */
     early_init();
 
-- 
2.35.3
```

It will output both FDPLLs to PB14 and PB10. Their frequency can then be measured using an oscilloscope.


### Issues/PRs references
None.

19612: pkg/ndn-riot: drop unmaintained pkg r=benpicco a=maribu

### Contribution description

Upstream [1] has seen no activity since 2018, so it safe to assume this is dead. It is reasonable to assume that any users - if there ever were any - have moved on.

Fixes #15638

[1]: https://github.com/named-data-iot/ndn-riot


19643: examples/suit_update: some test fixes r=aabadie a=kaspar030



19655: net/ipv6: make use of clz in ipv6_addr_match_prefix() r=benpicco a=benpicco



Co-authored-by: Fabian Hüßler <fabian.huessler@st.ovgu.de>
Co-authored-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
@bors bors bot closed this as completed in bf168e4 May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: network Area: Networking Area: pkg Area: External package ports Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants