Skip to content

Conversation

@zengwei00
Copy link

fix the Memory leak: buf

Signed-off-by: zengwei zengwei1@uniontech.com

letoram and others added 30 commits July 4, 2022 18:13
this should make it easier to pair arcan and arcan-net builds with
a specific build/checkout/...

FossilOrigin-Name: 0e02bafa8e4b9b2dce6fcabb86b5db28b84c64ddd947a9ea97eb7085223846f0
This should fix backlight control on some recent laptops, should
possibly investigate further but the assumption on basename and
card name does not seem to hold.

FossilOrigin-Name: 2143cf4496d7dc31932e5af46993fdb83570a17358c519f6d803ad92c39e6ddd
This is a minor performance nit for cases where one want to update
the attr, such as recoloring or highlighting - without reading back
or otherwise track the actual codepoint contents.

It adds a function that supports updating only the attribute portion,
and is added to the lua bindings as an overloaded form of write_to.

FossilOrigin-Name: 58f70c88aab6c8dd424f02d7dde9538abc94c14d826737290218c5c8d0c43231
FreeBSD doesn't support /latest and /quarterly package repos on EOL
versions. 13.0 reaches EOL on 2022-08-31, so avoid CI breakage.

FossilOrigin-Name: b29e54a09c66e1cf227d48a202f1e29dff673717821318d2ce2a04cee411e3bc
The previous push to this was mostly a placeholder to get rid of
deprecated warnings and did not exactly work. This time around most
issues should be sorted, and while the code remains ugly as sin,
it is at least back to a tolerable / usable state.

FossilOrigin-Name: fe02407a4af238ee97a106fb854f6899f60661975929f3028c370374adf10477
FossilOrigin-Name: 348ed5a73f2c12f7ab911d6aa5833ac2716a6e605ec1340585fb0d8aafff29c8
FossilOrigin-Name: 85705bce5bf71da68d91309f31d9569bac5a042eee7658a6fd3e96a897aad884
The lookup function was not referenced, causing keys to be ignore
due to not being locally accepted.

FossilOrigin-Name: 59083a99eadc2a34b38769fb3553598beb4156f4f0a937ac9f5675e05f04636d
This would case a bad sleep on debug builds, while clocking at
framecap in release builds.

FossilOrigin-Name: 5ebd2e1fd9c320186e435dec9b4340c037c35c815850f39277decd64929fef74
FossilOrigin-Name: 95f55e87c728f3cebee2d332203a51866cd0c9245cd98a0cf418e5c73fdd5bd7
The last round of ffmpeg fixes were built around upstream/master ffmpeg
which deprecates things yet not deprecated elsewhere. Alas the intended
functions for solving the deprecations have also not been added before
marking the members as such.

FossilOrigin-Name: 89cd17028e83897109aa47f75340570b019e8cb0fc462a40002d6626aec1a8e7
===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: /man1/aclip.1
===> Checking for items in pkg-plist which are not in STAGEDIR
Error: Missing: share/man/man1/aclip.1.gz

FossilOrigin-Name: 824aab08d5284df52da8329ef3b42b1054fa0b1948110f12cec6b2ebcf842a58
FossilOrigin-Name: b7faba6a8f50bce4696b12320966e52ca84c4c6b234ab2ff023748f03db6dec3
FossilOrigin-Name: 6b49700acca11ee876f00641c1fc96fe2186e43b1182a3d989e313b2af45f1fd
The wrong amount was being slid, causing possible end-of-buffer
without LF strings to truncate. The edge case of no lf in full
buffer at eof was also not covered.

FossilOrigin-Name: 63d1c0869440ddb09e905422b1d88bf0fd873ed26ba0e5c047ead57b75384457
when going from lwa primary or subsegment, the wrong event category
was being set (target instead of external) causing messages to be
discarded in the parent event processing, fixed.

FossilOrigin-Name: 080aebfa82eafc8eac35f510a0cd1c22510433cd5afe47734a20f5755b2a52a1
This exposes more shmif features in LWA, permitting WORLDID to test
for TYPE_FRAMESERVER, as well as updating handlers there. The handler
for WORLDID and for define_arcantarget now accept state+blob-io with
similar semantics as open_nonblock.

FossilOrigin-Name: b440a7961b8dd16f615fd574a6dd218ffb5fdb54ce97ac2ef9835aca45c5b37b
- use macos-12 as macos-10.15 will be removed on 2022-08-30
- use major version to transparently pick up updates

FossilOrigin-Name: c205160f93aed082c237e25dc634aad7738946717ea2cac75fb706fcf448bf47
this caused a meta-modifier decode error in cat9 on builds that didn't
have a static bitop included in the luavm already.

FossilOrigin-Name: ba58f6cae1609d3e9c76bcecb042909fe07acc145606b6b172f82ed23158127b
The previous fix to bitop did not remove the garbage that bitop
register leaves on the stack, causing early rejection. The old
merge of nbio-write/flush was also botched by mapping the wrong
functions but nobody noticed.

FossilOrigin-Name: 25eee486884e11c8dbde4744090765f1b7ebb9498bbbc48e4d5f2faa18dc4c43
same procedure as before, forgot the patches we did to the packing
macro.

FossilOrigin-Name: 1a52e2d47f4f4d5948ca1310e0bdc89b0a46d7a1759bac8b600299fb2a317275
The fn-callback and table versions of the read function both suffer
if the source is inifinite and faster than the processing, causing
a livelock. Normally the data_handler is used for that, but for
'foreach line' kind of contexts the other form mixes better in some
contexts.

To avoid breaking current use, this adds the behaviour that a true
return from the callback:

    a:read(function(line, eof) ... return true)

will cancel processing until the next call. Similarly, the table
form now has a hidden key member:

    local tbl = {read_cap = 10}
    a:read(tbl)

will only read read_cap elements.

FossilOrigin-Name: dc0c2b83b39a60da5fab7310fcb5f151d49bcb580da201a374a30a4910458cd6
this caused the modifier version of ctrl-space get the wrong keysym
field (unknown or ' ' instead of the corresponding space value).

FossilOrigin-Name: be591fd42ab2b0f11fa6c746cf15b6294235400531fe118a1f582c43701d75b2
FossilOrigin-Name: c4c30e8b5d5ec3f4ae879f20f00f92930f7d52e59b245a251b409f0cd512bcda
The state-in/out arguments were not passed correctly and the calls
masked entirely in readline state. More edge cases with nbio covered.

FossilOrigin-Name: f8ff43a2860541d975a04afc9ea1b6c67b32d3054d9c49d14a71d8a49f63aec5
This would trigger in the (rare) case where a blob transfer is
initiated but with no data to be read at that point in time.

FossilOrigin-Name: 5a9db909d8f5086736f475afa8bc6de87cceae2cdc8170136b538a56af1b5558
Borked patching lua.c causing it to always accept regardless of ns

FossilOrigin-Name: a73e2bd0f89f63423322c7a37734003e2400a87220a7b60489c29d00c314497f
This should fix some signal races when there is a resize storm at
startup (tiling WM particularly) for altscreen applications like
nvim and top. Nvim still has problems, but those should be resolved
in neovim (49a9fb2).

FossilOrigin-Name: c33ba6c78d287c7adb18a31ce769adcae5673e32cbe31a9e7d35a1b4f7990fca
The wndhint parts were left in an incomplete state last release.
This should add the missing 'core' parts, though there still needs
to be some testing done in durden and cat9.

The problem is:

1. tui client requests an embedded handover surface at x,y
2. tui client receives and hands over
3. external client begins drawing
4. tui clients moves and resizes the handover window to be
   'iconified' (scaled)
5. WM respects this and picks the best fit.
6. tui client now wants it to be drawn best client determined fit.
   within some constraints.
7. WM forwards the hint.
8. client resizes and draws.
8. WM gets the new frame, needs to communicate this..

with a bonus of 9. WM decides to detach and external client should
not try and compose (basically ignore) it until it dies or reattaches.

Both need the same thing, basically a way to route displayhints to
the proxy window. To do this we add some basic parent/child tracking
and in the displayhint with a matching subsegment token, redirect
the dimensions to the handler of the proxy window.

FossilOrigin-Name: 398dcff06d2f57f22d402906e411766c8b354fb33f5e7e9b1690b2921e3aa0b4
The lua-tui/lash/cat9 saga really needs access to domain sockets
at a coarse grained level. This already existed in alt but could
not really be leveraged. Moved things around and exposed 'unix'
to tui-fopen.

FossilOrigin-Name: b581727c8dd65a69199e6e3d59ba339f47f65e638ecc4863bc341190134e99ca
void and others added 28 commits December 2, 2023 10:14
FossilOrigin-Name: 16009953e231ab9ce1fc263ab53b2ca116a2d91c3e60e7d982c3d84be34ed5da
FossilOrigin-Name: 23998deaaf76ddfeaa9f1d057eae6700de98edcfa20d5ac625bd2479115f6381
FossilOrigin-Name: 196ec6b91e93c0079dbbfc3fbbe7aa0784bf1dd2c3138d5a025dc66ebd510a0c
FossilOrigin-Name: be8f11edaa2a8f2c3925969eb435df3c5123942ca573f6752a536ab9761e4296
FossilOrigin-Name: 324714ae3f604d0157dfca2cdcaa3f89b5f40801f5b18494a0ce7adf140aa299
FossilOrigin-Name: 003bfc0d045b50abc30546419c8a59eabf6f4d803a8621ec15e7b141aae2a55c
…r blob

FossilOrigin-Name: 2896ce7d3aff3e759fab86ac78db9e699422cb6c11160ded40c82becbf2dc24c
FossilOrigin-Name: 60d1a88298f5dfb06e6bd0cecc8dff3dfa2c884f033d34c33df6fd274c042e7b
FossilOrigin-Name: f3eb4ae3ac458f2f6b80f50150969b8eff9fb691493106804273c44f9614d098
FossilOrigin-Name: 81ff94f473833b0f80b18da6fbda0aff24df18f856cabe7ece4d216ef5f56c8b
FossilOrigin-Name: 6dea6ae67a0b12d858a1770128a1daa2711dde834380ac315f46ac041804cfce
FossilOrigin-Name: cd2e33308baef4cfe9784b44c95234018c6d866c12dd5464b9dc5c5bdb469936
FossilOrigin-Name: a5de3d42bc30eba31ad8e37428294e28859b7f0b6f921a1a1ffdece2f6edfc2f
FossilOrigin-Name: 4e2e9f462dfc0f788bbdb90d181717207b5f3f91b0e670f600876ca8990c445f
FossilOrigin-Name: 18ed0f6efa0e172186e0e8f67228ae6960fb747e2b4249e4f25bbab889ab6b49
…e way

FossilOrigin-Name: 6616919f7cabd1a57a54f4639d99e27976faadd0733688d86dfdea191efd818d
FossilOrigin-Name: d28f6a4c6866be99c7e4126b46f5549754690dce4d140d91e124ed05fc319204
…ems forcing sink to get stuck in drain

FossilOrigin-Name: 835aeb0c128a3e6e09877376c84109937dd1df55bcb1bff68e7c205f5d7b4bd3
…ic 32)

FossilOrigin-Name: 7a0fbaac0010fcd9b865a7448f83dc199645363152bfda28953f7f89c1d04884
FossilOrigin-Name: f2d555ca26845f0039e9e65357615c7484d2102553966627255a899b04865f2c
FossilOrigin-Name: b55490e07b06a69767d29fb668c17e5edc48324d315a7da85a33e7d1eef804f9
FossilOrigin-Name: 3142fd5c03289ffa1525028993775f59ae7a8c9d57b6b415c1fb112164ec6f2d
FossilOrigin-Name: 6253fa8007983c00cd00e8bbfadd60438c38b52da79df6f9e7697ef9729a745e
FossilOrigin-Name: 7407ba8160510c469b5098605fb5586cceac26387246528470034b65b0b5538c
FossilOrigin-Name: 848311239f9147e807b2adef421bcc81058cebe769b96e5a939055bfe77ffdcd
FossilOrigin-Name: 82e300f33a1d62ed2598ae4b590684eeebd2c5486cca937334b63bff9b34d0e9
FossilOrigin-Name: cf965ac53feb6adcca0248eb949488c60c0e015d3b81392eb19a73eb3438955d
fix the Memory leak: buf

Signed-off-by: zengwei zengwei1@uniontech.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants