-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
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 overflow when using BLOCK_BUFFER_SIZE >= 128 #20130
Possible overflow when using BLOCK_BUFFER_SIZE >= 128 #20130
Conversation
Possible overflow then using BLOCK_BUFFER_SIZE >= 128
c30672f
to
4274255
Compare
I'm not sure we want to advocate such a large buffer size. There's no special benefit to a very large buffer. I may just add a sanity check for buffer size larger than 64. |
4274255
to
a97a1ae
Compare
Indicate that 64 is the maximum value for BLOCK_BUFFER_SIZE
Sanity check would be sufficient, then the conditional type would not even be needed. Need to modify the comment in |
I don't want to make it a hard policy, per se. I do, however, want to suggest that for most users there is not a need to use such a large buffer. |
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Possible overflow when using BLOCK_BUFFER_SIZE >= 128
When defining a
BLOCK_BUFFER_SIZE
>= 128
inconfiguration_adv.h
in combination with using#define DISABLE_INACTIVE_EXTRUDER
inconfiguration.h
, there will be a compiler warning (with possible unwanted consequences) as follows:Changing the definition of
g_uc_extruder
_last_move fromuint8_t
touint16_t
inplanner.cpp/planner.h
would solve this and this won't cost very much memory (i.e. plus one byte per extruder).