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

[st-trace] Bug in function static bool read_trace( ) #1400

Closed
MikuChan03 opened this issue May 30, 2024 · 1 comment
Closed

[st-trace] Bug in function static bool read_trace( ) #1400

MikuChan03 opened this issue May 30, 2024 · 1 comment

Comments

@MikuChan03
Copy link

Hello Senpai! 🎶🎶🎶

Watashi was innocently enjoying youw sugoi stlink pwogwam, when it hit watashi like a ton of bwicks...
st-twace doesn't actually wowk, like at all   (つ﹏<。)

So it dawned on watashi that an ewwow had gotton into this stweamylined, kawaii implementation.
Hewe it is:

static bool read_trace(stlink_t *stlink, st_trace_t *trace) {
  uint8_t* buffer = 0;
  int32_t length = stlink_trace_read(stlink, buffer, sizeof(buffer));

The buffew is only 4-8 bytes big, much to small fowthe twace message. Bettew yet, it stands to weason that addwess 0 is not typically mapped into pwogwam memowy, it's kinda special that way 💕.

Doing this, howevew:

static bool read_trace(stlink_t *stlink, st_trace_t *trace) {
  uint8_t buffer[STLINK_V3_TRACE_BUF_LEN];
  int32_t length = stlink_trace_read(stlink, buffer, sizeof(buffer));

evewything is hunky-dowy! Weal peachy-cweamy 💯⭐✓

That's all watashi wanted to say.
Sayonawa XOXO

@Ant-ON
Copy link
Collaborator

Ant-ON commented May 30, 2024

@MikuChan03 yes, it's look like big bug in the read_trace function implementation

@Nightwalker-87 Nightwalker-87 self-assigned this May 30, 2024
@Nightwalker-87 Nightwalker-87 added this to the v1.8.1 milestone May 30, 2024
@Nightwalker-87 Nightwalker-87 moved this to Ready in Release v1.8.1 May 30, 2024
@Nightwalker-87 Nightwalker-87 moved this from Ready to In progress in Release v1.8.1 May 30, 2024
@Nightwalker-87 Nightwalker-87 changed the title ✨✨ Oh no UwU ✨✨ [st-trace] Bug in function static bool read_trace( ) May 30, 2024
@github-project-automation github-project-automation bot moved this from In progress to Done in Release v1.8.1 May 30, 2024
@stlink-org stlink-org locked as resolved and limited conversation to collaborators May 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: Done
Development

No branches or pull requests

3 participants