message
stringlengths
6
474
diff
stringlengths
8
5.22k
Don't create a %permit delta if there is no change.
=/ sus/(set ship) %. sis.con.shape ?:(add ~(dif in sis) ~(int in sis)) + ?~ sus +>.$ =. +>.$ %- so-act :- %phrase - %- ~(rep in sus) + %- ~(rep in `(set ship)`sus) |= {s/ship a/audience t/(list speech)} :- (~(put in a) [s %inbox]) [[%inv inv so-cir] t]
removed a hack
@@ -4069,24 +4069,6 @@ void PoiseSeasonal(BODY *body, int iBody) { body[iBody].daWaterFrac[i]*body[iBody].daTempWater[i]; body[iBody].dTGlobalTmp += body[iBody].daTempLW[i]/body[iBody].iNumLats; - if (body[iBody].daPlanckBSea[i] != body[iBody].daPlanckBSea[i]) { - printf("fudiknenro\n"); - } - - if (body[iBody].daPlanckASea[i] != body[iBody].daPlanckASea[i]) { - printf("fudiknenro\n"); - } - - if (body[iBody].daTempLand[i] != body[iBody].daTempLand[i]) { - printf("fudiknenro\n"); - } - - if (body[iBody].daTempWater[i] != body[iBody].daTempWater[i]) { - printf("fudiknenro\n"); - } - - - if (body[iBody].bCalcAB) { /* Calculate A and B from Haqq-Misra et al 2016 result */ // body[iBody].daPlanckB[i] = dOLRdThm16(body,iBody,i);
we do not trust hccap anymore and set replaycount check to no
@@ -139,7 +139,7 @@ for(p = 0; p < hcsize; p++) zeiger++; continue; } - if((zeiger->eapol_size < 8) || (zeiger->eapol_size > 256 -4)) + if((zeiger->eapol_size < 8) || (zeiger->eapol_size > 256)) { zeiger++; eapolerror++; @@ -164,11 +164,11 @@ for(p = 0; p < hcsize; p++) hcxrecord.version = HCCAPX_VERSION; m = geteapkey(zeiger->eapol); if(m == 2) - hcxrecord.message_pair = MESSAGE_PAIR_M12E2; + hcxrecord.message_pair = MESSAGE_PAIR_M12E2NR; if(m == 3) - hcxrecord.message_pair = MESSAGE_PAIR_M32E3; + hcxrecord.message_pair = MESSAGE_PAIR_M32E3NR; if(m == 4) - hcxrecord.message_pair = MESSAGE_PAIR_M14E4; + hcxrecord.message_pair = MESSAGE_PAIR_M14E4NR; hcxrecord.essid_len = essid_len; memcpy(hcxrecord.essid, zeiger->essid, essid_len); hcxrecord.keyver = geteapkeyver(zeiger->eapol); @@ -230,7 +230,7 @@ for(p = 0; p < hcxsize; p++) continue; } - if(zeiger->eapol_len > 256) + if(zeiger->eapol_len > 256 -4) { eapolerror++; zeiger++;
add quotes around string sub
@@ -28,7 +28,7 @@ def get_image_version() { def now = LocalDateTime.now() return (now.format(DateTimeFormatter.ofPattern("yyyy")) + "." + \ now.format(DateTimeFormatter.ofPattern("MM")) + "." + \ - now.format(DateTimeFormatter.ofPattern("dd")) + env.$BUILD_NUMBER) + now.format(DateTimeFormatter.ofPattern("dd")) + "${BUILD_NUMBER}") } def get_commit_id() {
VStudio: Factorise conditions and value for ProgramDataBaseFile[Name]
end end - function m.programDatabaseFile(cfg) + local function getSymbolsPathRelative(cfg) if cfg.symbolspath and cfg.symbols ~= p.OFF and cfg.debugformat ~= "c7" then - m.element("ProgramDatabaseFile", nil, p.project.getrelative(cfg.project, cfg.symbolspath)) + return p.project.getrelative(cfg.project, cfg.symbolspath) + else + return nil + end + end + + function m.programDatabaseFile(cfg) + local value = getSymbolsPathRelative(cfg) + + if value then + m.element("ProgramDatabaseFile", nil, value) end end function m.programDatabaseFileName(cfg) - if cfg.symbolspath and cfg.symbols ~= p.OFF and cfg.debugformat ~= "c7" then - m.element("ProgramDataBaseFileName", nil, p.project.getrelative(cfg.project, cfg.symbolspath)) + local value = getSymbolsPathRelative(cfg) + + if value then + m.element("ProgramDataBaseFileName", nil, value) end end
Ensure HTML report outputs a max of two decimals for all byte sizes.
@@ -107,7 +107,7 @@ GoAccess.Util = { if (bytes == 0) return numOnly ? 0 : '0 Byte'; var k = 1024; - var dm = decimals + 1 || 3; + var dm = decimals + 1 || 2; var sizes = ['B', 'KiB', 'MiB', 'GiB', 'TiB']; var i = Math.floor(Math.log(bytes) / Math.log(k)); return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + (numOnly ? '' : (' ' + sizes[i]));
fix load nil
@@ -172,7 +172,7 @@ function sandbox_io.load(filepath, opt) -- done local result, errors = io.load(filepath, opt) - if not result then + if errors ~= nil then raise(errors) end
story: restore previous mark functionality, ignore conflicts
^- story-diff (need (join ali bob)) :: XX temporary, only because join doesn't fail -- - :: ++ grow :: convert to |% :: ++ txt ^- wain %+ snoc :: ensure terminating newline is present - %+ turn ~(tap by tale) - |= [chapter=[tak=tako:clay message=[title=@t body=@t]]] - =/ tak=tako:clay tak.chapter - =/ [title=@t body=@t] +.chapter - (crip "commit: {<`@uv`tak>}\0a{(trip title)}\0a\0a{(trip body)}\0a---") + %+ murn ~(tap by tale) + |= [[=tako:clay proses=(set prose)]] + =/ proses-list ~(tap in proses) + ?~ proses-list ~ + =/ prose-a i.proses-list + %- some + (crip "commit: {<`@uv`tako>}\0a{(trip title.prose-a)}\0a\0a{(trip body.prose-a)}\0a---") + ::(turn ~(tap by proses) |=(=prose )) '' -- ++ grab =/ parsed-story `(list [@uv @t wain])`(rash story-text story-parser) %- ~(gas by *story) %+ turn parsed-story - |= [tak=tako:clay title=@t body=wain] - [tak title (of-wain:format body)] + |= [=tako:clay title=@t body=wain] + :- tako + %- silt + :~ [title (of-wain:format body)] + == -- --
Add sceUdcdGetDrvState NID
@@ -5088,6 +5088,7 @@ modules: functions: sceUdcdGetDeviceState: 0xFCD31220 sceUdcdGetDeviceInfo: 0x701C87CF + sceUdcdGetDrvState: 0x99B3DA5D sceUdcdRegisterCallback: 0xA7070093 sceUdcdUnregisterCallback: 0xC3FBA889 sceUdcdWaitState: 0x59EFFAF1
Pass arguments through to Canvas:renderTo callback;
int l_lovrCanvasRenderTo(lua_State* L) { Canvas* canvas = luax_checktype(L, 1, Canvas); luaL_checktype(L, 2, LUA_TFUNCTION); + int nargs = lua_gettop(L) - 2; lovrGraphicsPushView(); lovrCanvasBind(canvas); - lua_settop(L, 2); - lua_call(L, 0, 0); + lua_call(L, nargs, 0); lovrCanvasResolveMSAA(canvas); lovrGraphicsPopView(); return 0;
Update order of arguments for idf.py in docs
@@ -130,13 +130,13 @@ Change into tools/unit-test-app directory to configure and build it: * `idf.py menuconfig` - configure unit test app. -* `idf.py build -T all` - build unit test app with tests for each component having tests in the ``test`` subdirectory. -* `idf.py build -T xxx` - build unit test app with tests for specific components. -* `idf.py build -T all -E xxx` - build unit test app with all unit tests, except for unit tests of some components. (For instance: `idf.py build -T all -E ulp mbedtls` - build all unit tests exludes ulp and mbedtls components). +* `idf.py -T all build` - build unit test app with tests for each component having tests in the ``test`` subdirectory. +* `idf.py -T xxx build` - build unit test app with tests for specific components. +* `idf.py -T all -E xxx build` - build unit test app with all unit tests, except for unit tests of some components. (For instance: `idf.py -T all -E ulp -E mbedtls build` - build all unit tests exludes ulp and mbedtls components). When the build finishes, it will print instructions for flashing the chip. You can simply run ``idf.py flash`` to flash all build output. -You can also run ``idf.py flash -T all`` or ``idf.py flash -T xxx`` to build and flash. Everything needed will be rebuilt automatically before flashing. +You can also run ``idf.py -T all flash`` or ``idf.py -T xxx flash`` to build and flash. Everything needed will be rebuilt automatically before flashing. Use menuconfig to set the serial port for flashing.
imx6ull: Allow setting 3 bits of IO daisy
@@ -209,7 +209,7 @@ static int _imx6ull_setIOisel(int isel, char daisy) if (isel < pctl_isel_anatop || isel > pctl_isel_usdhc2_wp) return -EINVAL; - *(imx6ull_common.iomux + isel) = daisy & 0x3; + *(imx6ull_common.iomux + isel) = daisy & 0x7; return 0; }
notify: conditional rewatch in on-load
=/ old !<(versioned-state old-vase) ?- -.old %0 - `this(state old) + :_ this(state old) + ?. (~(has by wex.bowl) [/hark our.bowl %hark-store]) + ~ + [(~(watch-our pass:io /hark) %hark-store /updates)]~ == :: ++ on-poke
workflow/backup: remove unused includes
#include <time.h> #include <ui/components/confirm.h> #include <ui/components/ui_components.h> -#include <ui/screen_process.h> -#include <ui/screen_stack.h> #include <workflow/backup.h> #include <workflow/confirm.h> #include <workflow/password.h>
braille: Updated French translation.
@@ -3,6 +3,8 @@ NEWS - OpenPrinting CUPS Filters v1.17.6 - 2017-09-15 CHANGES IN V1.17.7 + - braille: Updated French translation. Thanks to Samuel + Thibault for this patch. - braille: Add a PPD which generates UBRL output, i.e. Braille expressed in Unicode. This is not useful for actual embossers, but very convenient to check output to be
Fix a minor nit in the hkdflabel size
@@ -41,7 +41,7 @@ int tls13_hkdf_expand(SSL *s, const EVP_MD *md, const unsigned char *secret, * + bytes for the hash itself */ unsigned char hkdflabel[sizeof(uint16_t) + sizeof(uint8_t) + - + sizeof(label_prefix) + TLS13_MAX_LABEL_LEN + + (sizeof(label_prefix) - 1) + TLS13_MAX_LABEL_LEN + 1 + EVP_MAX_MD_SIZE]; WPACKET pkt;
Increase prefix max length
@@ -310,7 +310,7 @@ struct dati { /* WEBSOCKETS STRUCTURE */ session::dati session; - char prefix[5]; //if set will execute message.command callback + char prefix[32]; //if set will execute message.command callback struct { /* CALLBACKS STRUCTURE */ idle_cb *on_idle; //triggers in every event loop iteration
server: net: fix mem allocator name
@@ -60,7 +60,7 @@ struct mk_net_connection *mk_net_conn_create(char *addr, int port) struct mk_net_connection *conn; /* Allocate connection context */ - conn = mk_mem_malloc(sizeof(struct mk_net_connection)); + conn = mk_mem_alloc(sizeof(struct mk_net_connection)); if (!conn) { return NULL; }
redpine: fix failsafe condition
@@ -170,7 +170,6 @@ static uint8_t redpine_handle_packet() { //out of sync with packets - do a complete resysnc quic_debugf("REDPINE: resync %u", (timer_micros() - total_time)); rx_rssi = 0; - failsafe = 1; next_channel(1); cc2500_strobe(CC2500_SRX); @@ -192,7 +191,7 @@ static uint8_t redpine_handle_packet() { redpine_fast = redpine_fast == 1 ? 0 : 1; max_sync_delay = REDPINE_PACKET_TIME_US; protocol_time = timer_micros(); - + failsafe = 1; protocol_state = FRSKY_STATE_INIT; rx_init(); reset_looptime();
Add -static-libgcc to solaris-sparcv7-gcc shared_ldflag This avoids a run-time dependency on libgcc_s.so which may not be present on all systems. OpenSSL already uses -static-libgcc for the solaris-x86-gcc and solaris64-x86_64-gcc configurations. CLA: trivial
@@ -317,7 +317,7 @@ my %targets = ( ex_libs => add(threads("-pthread")), bn_ops => "BN_LLONG RC4_CHAR", shared_cflag => "-fPIC", - shared_ldflag => add_before("-shared"), + shared_ldflag => add_before("-shared -static-libgcc"), }, "solaris-sparcv8-gcc" => { inherit_from => [ "solaris-sparcv7-gcc" ],
Make Lua an instance of MonadMask MonadMask from Control.Monad.Catch allows to mask asynchronous exceptions. This allows to define a finalizer for Lua operations.
@@ -39,7 +39,7 @@ module Foreign.Lua.Types.Lua , liftLua1 ) where -import Control.Monad.Catch (MonadCatch, MonadThrow) +import Control.Monad.Catch (MonadCatch, MonadMask, MonadThrow) import Control.Monad.Reader (ReaderT (..), MonadReader, MonadIO, ask, liftIO) import Foreign.Lua.Api.Types (LuaState) @@ -51,6 +51,7 @@ newtype Lua a = Lua { unLua :: ReaderT LuaState IO a } , Monad , MonadCatch , MonadIO + , MonadMask , MonadReader LuaState , MonadThrow )
create %{testuser} account in pre-install
@@ -57,6 +57,12 @@ cp -a * %{buildroot}/home/%{testuser}/tests %clean rm -rf $RPM_BUILD_ROOT +%pre +getent passwd %{testuser} >/dev/null || \ + /usr/sbin/useradd -U -c "OpenHPC integration test account" \ + -s /bin/bash -r -d /home/%{testuser} %{testuser} +exit 0 + %post %postun
Fix optimised special case
@@ -259,7 +259,7 @@ namespace carto { namespace vt { float xOffset = std::ceil(-face->glyph->metrics.horiBearingX / 64.0f); float yOffset = std::ceil((face->glyph->metrics.height - face->glyph->metrics.horiBearingY) / 64.0f); msdfgen::Bitmap<float> sdf(static_cast<int>(width) + 2 * RENDER_PADDING, static_cast<int>(height) + 2 * RENDER_PADDING); - msdfgen::generateSDF_legacy(sdf, shape, 1, msdfgen::Vector2(1, 1), msdfgen::Vector2(RENDER_PADDING + xOffset, RENDER_PADDING + yOffset), RENDER_PADDING + 1.0); + msdfgen::generateSDF_legacy(sdf, shape, 1, msdfgen::Vector2(1, 1), msdfgen::Vector2(RENDER_PADDING + xOffset, RENDER_PADDING + yOffset), revert ? -(RENDER_PADDING + 1.0) : RENDER_PADDING + 1.0); std::vector<std::uint32_t> glyphBitmapData(sdf.width() * sdf.height()); for (int y = 0; y < sdf.height(); y++) {
Irrelevenat changes to test sync. Try number 5
1 WHAT DOES THE PACKAGE CONTAIN? -------------------------------- The code contains programs to perform rigid, affine and non-linear registration -of 2D and 3D images stored as Nifti or Analyze (nii or hdr). +of 2D and 3D images stored as Nifti or Analyze (nii or hdr/img). The rigid and affine registration are performed using an algorithm initially presented by Ourselin et al.[1]. The symmetric versions of the rigid and
Lower verbosity of noisey data
@@ -345,7 +345,7 @@ static void filter_measurements(survive_optimizer *optimizer, FLT *deviates) { meas->invalid = true; optimizer->stats.dropped_meas_cnt++; - SV_VERBOSE(100, "Ignoring noisy data at lh %d sensor %d axis %d val %f (%7.7f/%7.7f) %7.7f %7.7f", meas->lh, + SV_VERBOSE(105, "Ignoring noisy data at lh %d sensor %d axis %d val %f (%7.7f/%7.7f) %7.7f %7.7f", meas->lh, meas->sensor_idx, meas->axis, meas->value, fabs(deviates[i]), avg_dev, P, chauvenet_criterion); deviates[i] = 0.;
Update output message when certification verified fail
@@ -2240,7 +2240,10 @@ int main( int argc, char *argv[] ) " or you didn't set ca_file or ca_path " "to an appropriate value.\n" " Alternatively, you may want to use " - "auth_mode=optional for testing purposes.\n" ); + "auth_mode=optional for testing purposes if " + "server is not TLS 1.3.\n" + " For TLS 1.3 server, try `ca_path=/etc/ssl/certs/`" + "or other folder that has root certificates\n" ); mbedtls_printf( "\n" ); goto exit; }
weather: redirect after autodetect submission
@@ -23,6 +23,7 @@ export default class WeatherTile extends Component { }, { maximumAge: Infinity, timeout: 10000 }); api.action("clock", "json", latlng); api.action('weather', 'json', latlng); + this.setState({ manualEntry: !this.state.manualEntry }); }); }
report_writer_test.cpp not working in windows this comment is temprorary it is to be removed once fixed
@@ -230,10 +230,16 @@ set (ALL_TESTS test/vcf/predefined_format_tags_test.cpp test/vcf/record_cache_test.cpp test/vcf/record_test.cpp - test/vcf/report_writer_test.cpp test/vcf/test_utils.hpp ) +if(NOT WINDOWS) + set (ALL_TESTS + ${ALL_TESTS} + test/vcf/report_writer_test.cpp + ) +endif () + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) add_executable (test_validator_v41 test/main_test.cpp ${V41_TESTS})
[mod_magnet] remove lighty.r.req_attr["response.*"] remove experimental lighty.r.req_attr["response.*"] accessors (added in lighttpd 1.4.56 (2020) and replaced in lighttpd 1.4.65 (2022))
@@ -1839,12 +1839,7 @@ typedef struct { MAGNET_ENV_REQUEST_SERVER_PORT, MAGNET_ENV_REQUEST_PROTOCOL, MAGNET_ENV_REQUEST_SERVER_NAME, - MAGNET_ENV_REQUEST_STAGE, - - /* remove after lighttpd 1.4.65 */ - MAGNET_ENV_RESPONSE_HTTP_STATUS, - MAGNET_ENV_RESPONSE_BODY_LENGTH, - MAGNET_ENV_RESPONSE_BODY + MAGNET_ENV_REQUEST_STAGE } type; } magnet_env_t; @@ -1874,10 +1869,6 @@ static const magnet_env_t magnet_env[] = { { CONST_STR_LEN("request.server-name"), MAGNET_ENV_REQUEST_SERVER_NAME }, { CONST_STR_LEN("request.stage"), MAGNET_ENV_REQUEST_STAGE }, - { CONST_STR_LEN("response.http-status"), MAGNET_ENV_RESPONSE_HTTP_STATUS }, - { CONST_STR_LEN("response.body-length"), MAGNET_ENV_RESPONSE_BODY_LENGTH }, - { CONST_STR_LEN("response.body"), MAGNET_ENV_RESPONSE_BODY }, - { NULL, 0, MAGNET_ENV_UNSET } }; @@ -1996,29 +1987,6 @@ magnet_env_get_buffer_by_id (request_st * const r, const int id) http_request_state_append(dest, r->state); break; - /* remove after lighttpd 1.4.65 */ - case MAGNET_ENV_RESPONSE_HTTP_STATUS: - buffer_append_int(dest, r->http_status); - break; - case MAGNET_ENV_RESPONSE_BODY_LENGTH: - if (!r->resp_body_finished) - return NULL; - log_error(r->conf.errh, __FILE__, __LINE__, - "lighty.r.req_attr['response.body-length'] is deprecated " - "and will be removed. Use lighty.r.resp_body.len instead."); - buffer_append_int(dest, chunkqueue_length(&r->write_queue)); - break; - case MAGNET_ENV_RESPONSE_BODY: - if (!r->resp_body_finished) - return NULL; - log_error(r->conf.errh, __FILE__, __LINE__, - "lighty.r.req_attr['response.body'] is deprecated " - "and will be removed. Use lighty.r.resp_body.get instead."); - if (0 == chunkqueue_length(&r->write_queue) - || !(dest = chunkqueue_read_squash(&r->write_queue,r->conf.errh))) - buffer_copy_string_len((dest = r->tmp_buf), CONST_STR_LEN("")); - break; - case MAGNET_ENV_UNSET: return NULL; } @@ -2132,11 +2100,6 @@ static int magnet_env_set(lua_State *L) { return magnet_env_set_server_name(r, &val); #endif /*case MAGNET_ENV_REQUEST_STAGE:*//*(change attempts silently ignored)*/ - /* remove after lighttpd 1.4.65 */ - /*case MAGNET_ENV_RESPONSE_HTTP_STATUS:*/ - /*case MAGNET_ENV_RESPONSE_BODY_LENGTH:*/ - case MAGNET_ENV_RESPONSE_BODY: - return luaL_error(L, "r.req_attr['%s'] is read-only", key); } buffer * const dest = magnet_env_get_buffer_by_id(r, env_id);
options/posix: Add ENOSYS stub for tcgetpgrp()
@@ -293,9 +293,11 @@ unsigned long sysconf(int number) { __builtin_unreachable(); } } -pid_t tcgetpgrp(int) { - __ensure(!"Not implemented"); - __builtin_unreachable(); +pid_t tcgetpgrp(int fd) { + (void)fd; + mlibc::infoLogger() << "mlibc: tcgetpgrp() fails with ENOSYS" << frg::endlog; + errno = ENOSYS; + return -1; } int tcsetpgrp(int, pid_t) { __ensure(!"Not implemented");
ghost: add TODO for BB interrupts BRANCH=none TEST=make passes
@@ -307,7 +307,7 @@ void ppc_interrupt(enum gpio_signal signal) void retimer_interrupt(enum gpio_signal signal) { /* - * TODO(b/179513527): add USB-C support + * TODO(b/233317538): do we need this interrupt */ }
Improve comment Rephrase to simplify and add a link to the issue.
@@ -78,8 +78,8 @@ public final class SurfaceControl { public static IBinder getBuiltInDisplay(int builtInDisplayId) { try { - // Android Q does not have this method anymore but has a - // replacement. + // the method signature has changed in Android Q + // <https://github.com/Genymobile/scrcpy/issues/586> if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) { return (IBinder) CLASS.getMethod("getBuiltInDisplay", int.class).invoke(null, builtInDisplayId); } else {
OpenCoreMisc: Fix parsing Enabled in Tools section
@@ -322,7 +322,7 @@ OcMiscBoot ( OC_PICKER_CONTEXT *Context; UINTN ContextSize; UINT32 Index; - UINT32 ToolCount; + UINT32 ToolIndex; // // Do not use our boot picker unless asked. @@ -358,17 +358,15 @@ OcMiscBoot ( Context->CustomEntryContext = Storage; Context->CustomRead = OcToolLoadEntry; - ToolCount = 0; - - for (Index = 0; Index < Context->CustomEntryCount; ++Index) { + for (Index = 0, ToolIndex = 0; Index < Config->Misc.Tools.Count; ++Index) { if (Config->Misc.Tools.Values[Index]->Enabled) { - Context->CustomEntries[Index].Name = OC_BLOB_GET (&Config->Misc.Tools.Values[Index]->Name); - Context->CustomEntries[Index].Path = OC_BLOB_GET (&Config->Misc.Tools.Values[Index]->Path); - ++ToolCount; + Context->CustomEntries[ToolIndex].Name = OC_BLOB_GET (&Config->Misc.Tools.Values[Index]->Name); + Context->CustomEntries[ToolIndex].Path = OC_BLOB_GET (&Config->Misc.Tools.Values[Index]->Path); + ++ToolIndex; } } - Context->CustomEntryCount = ToolCount; + Context->CustomEntryCount = ToolIndex; Status = OcRunSimpleBootPicker ( Context
Suppress mkdir warning on Windows if folder exists
return "echo " .. v end, mkdir = function(v) - return "mkdir " .. path.translate(path.normalize(v)) + v = path.translate(path.normalize(v)) + return "IF NOT EXIST " .. v .. " (mkdir " .. v .. ")" end, move = function(v) return "move /Y " .. path.translate(path.normalize(v))
kdb-mountpoint-info.md: update
kdb-mountpoint-info -- Print information about the default storage and resolver or a mountpoint -====================================================================================== +=============================================================================================== ## SYNOPSIS @@ -12,24 +12,26 @@ This command will print information about the version, default resolver and defa ## EXAMPLES ``` -kdb info_2 +kdb mountpoint-info #> Version: 0.8.19 #> Default resolver: resolver_fm_hpu_b #> Default storage: ini kdb mount /tmp/test.ini system/test ini hello=ini -c hello=world -kdb info system/test +kdb mountpoint-info system/test #> Version: 0.8.19 #> Default resolver: resolver_fm_hpu_b #> Default storage: ini #> Mountpoint: system/test #> File: /tmp/test.ini +#> config: #> hello = world #> path = /tmp/test.ini #> getplugins: #> #0#resolver #> #5#ini#ini# +#> config: #> hello = ini #> setplugins: #> #0#resolver
init: add missing sync_icache after exception vector patching There are two cases where sync_icache is not called immediately after instructions are modified.
@@ -384,6 +384,7 @@ static bool load_kernel(void) if (kernel_entry < 0x2000) { cpu_set_pm_enable(false); memcpy(NULL, old_vectors, 0x2000); + sync_icache(); } do_stb = true; stb_container = kh; /* probably incorrect */ @@ -723,6 +724,7 @@ void setup_reset_vector(void) dst = (uint32_t *)0x100; while(src < &reset_patch_end) *(dst++) = *(src++); + sync_icache(); } void copy_exception_vectors(void)
libcupsfilters: Update comments about filter functions in filter.h The filter functions cfFilterGhostscript() and cfFilterPWGtoPDF() allow the output format also to be supplied as parameter and not only via filter data structure.
@@ -193,6 +193,7 @@ extern int cfFilterGhostscript(int inputfd, void *parameters); /* Requires specification of output format via data->final_content_type + or alternatively as parameter of type cf_filter_out_format_t. Output formats: PDF, raster-only PDF, PCLm, PostScript, CUPS Raster, PWG Raster, Apple Raster, PCL-XL @@ -330,6 +331,7 @@ extern int cfFilterPWGToPDF(int inputfd, void *parameters); /* Requires specification of output format via data->final_content_type + or alternatively as parameter of type cf_filter_out_format_t. Output formats: PDF, PCLm */
VERSION bump to version 1.4.48
@@ -37,7 +37,7 @@ endif() # micro version is changed with a set of small changes or bugfixes anywhere in the project. set(SYSREPO_MAJOR_VERSION 1) set(SYSREPO_MINOR_VERSION 4) -set(SYSREPO_MICRO_VERSION 47) +set(SYSREPO_MICRO_VERSION 48) set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION}) # Version of the library
Fix for GPV controls in EN_saveinpfile EN_saveinpfile was incorrectly saving the index of the GPV head loss curve inside of a simple control instead of the control status
@@ -425,7 +425,7 @@ int saveinpfile(Project *pr, const char *fname) link = &net->Link[j]; // Get text of control's link status/setting - if (control->Setting == MISSING) + if (control->Setting == MISSING || link->Type == GPV) { sprintf(s, " LINK %s %s ", link->ID, StatTxt[control->Status]); }
fix x509_PUBKEY propq so that it uses a copy
@@ -32,11 +32,27 @@ struct X509_pubkey_st { /* extra data for the callback, used by d2i_PUBKEY_ex */ OSSL_LIB_CTX *libctx; - const char *propq; + char *propq; }; static int x509_pubkey_decode(EVP_PKEY **pk, const X509_PUBKEY *key); +static int x509_pubkey_set0_libctx(X509_PUBKEY *x, OSSL_LIB_CTX *libctx, + const char *propq) +{ + if (x != NULL) { + x->libctx = libctx; + OPENSSL_free(x->propq); + x->propq = NULL; + if (propq != NULL) { + x->propq = OPENSSL_strdup(propq); + if (x->propq == NULL) + return 0; + } + } + return 1; +} + /* Minor tweak to operation: free up EVP_PKEY */ static int pubkey_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg) @@ -44,6 +60,7 @@ static int pubkey_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, X509_PUBKEY *pubkey = (X509_PUBKEY *)*pval; if (operation == ASN1_OP_FREE_POST) { + OPENSSL_free(pubkey->propq); EVP_PKEY_free(pubkey->pkey); } else if (operation == ASN1_OP_D2I_POST) { /* Attempt to decode public key and cache in pubkey structure. */ @@ -60,6 +77,11 @@ static int pubkey_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, return 0; } ERR_pop_to_mark(); + } else if (operation == ASN1_OP_DUP_POST) { + X509_PUBKEY *old = exarg; + + if (!x509_pubkey_set0_libctx(pubkey, old->libctx, old->propq)) + return 0; } return 1; } @@ -257,8 +279,8 @@ EVP_PKEY *d2i_PUBKEY_ex(EVP_PKEY **a, const unsigned char **pp, long length, ERR_raise(ERR_LIB_X509, ERR_R_MALLOC_FAILURE); return NULL; } - xpk2->libctx = libctx; - xpk2->propq = propq; + if (!x509_pubkey_set0_libctx(xpk2, libctx, propq)) + goto end; pxpk = &xpk2; } xpk = d2i_X509_PUBKEY(pxpk, &q, length);
test(autoEncrypter): fix incorrect cyphertext
@@ -122,7 +122,7 @@ describe('AutoEncrypter', function() { ssn: { $binary: { base64: - 'AWFhYWFhYWFhYWFhYWFhYWEC6f/1CgA+ncYs+mYa7q5ftmJVcJloVf+m8YBRGxZWo3qQkFSerlbOh71KRvffB7NH061iG8ctrYFv2BDRw+VQYEyJ1GrvJGaYr1Cuu7CW2KY=', + 'AWFhYWFhYWFhYWFhYWFhYWECRTOW9yZzNDn5dGwuqsrJQNLtgMEKaujhs9aRWRp+7Yo3JK8N8jC8P0Xjll6C1CwLsE/iP5wjOMhVv1KMMyOCSCrHorXRsb2IKPtzl2lKTqQ=', subType: '6' } }
Address - disallow non-indexed ds for loop range.
(def ,binding ,i) ,body)))) +(defn- check-indexed [x] + (if (indexed? x) + x + (error (string "expected tuple for range, got " x)))) + (defn- loop1 [body head i] (def {(+ i 2) object} head) (let [rest (loop1 body head (+ i 3))] (case verb - :range (let [[start stop step] object] + :range (let [[start stop step] (check-indexed object)] (for-template binding start stop (or step 1) < + [rest])) :keys (keys-template binding object false [rest]) :pairs (keys-template binding object true [rest]) - :down (let [[start stop step] object] + :down (let [[start stop step] (check-indexed object)] (for-template binding start stop (or step 1) > - [rest])) :in (each-template binding object [rest]) :iterate (iterate-template binding object rest) (loop1 body head 0)) (put _env 'loop1 nil) +(put _env 'check-indexed nil) (put _env 'for-template nil) (put _env 'iterate-template nil) (put _env 'each-template nil)
Made test_output_path thread safe
-import os +import errno import functools import json +import os import threading import six @@ -181,8 +182,11 @@ def test_output_path(path=None): """ import pytest test_out_dir = os.path.splitext(pytest.config.current_test_log_path)[0] - if not os.path.exists(test_out_dir): + try: os.makedirs(test_out_dir) + except OSError as e: + if e.errno != errno.EEXIST: + raise return _join_path(test_out_dir, path)
Check that dataset contains evaluated features
@@ -51,14 +51,6 @@ int mode_eval_feature(int argc, const char* argv[]) { NCatboostOptions::TFeatureEvalOptions featureEvalOptions; featureEvalOptions.Load(featureEvalJsonOptions); - const auto& featuresToEvaluate = featureEvalOptions.FeaturesToEvaluate.Get(); - for (const auto& featureSet : featuresToEvaluate) { - for (ui32 feature : featureSet) { - CB_ENSURE(Count(poolLoadParams.IgnoredFeatures, feature) == 0, "Tested feature " << feature << " should not be ignored"); - } - CB_ENSURE(Count(featuresToEvaluate, featureSet) == 1, "All tested feature sets must be different"); - } - NPar::LocalExecutor().RunAdditionalThreads(catBoostOptions.SystemOptions->NumThreads - 1); TVector<NJson::TJsonValue> classLabels = catBoostOptions.DataProcessingOptions->ClassLabels; @@ -73,6 +65,16 @@ int mode_eval_feature(int argc, const char* argv[]) { /*profile*/nullptr ); + const auto& featuresToEvaluate = featureEvalOptions.FeaturesToEvaluate.Get(); + const ui32 featureCount = pools.Learn->MetaInfo.GetFeatureCount(); + for (const auto& featureSet : featuresToEvaluate) { + for (ui32 feature : featureSet) { + CB_ENSURE(feature < featureCount, "Tested feature " << feature << " is not present; dataset contains only " << featureCount << " features"); + CB_ENSURE(Count(poolLoadParams.IgnoredFeatures, feature) == 0, "Tested feature " << feature << " should not be ignored"); + } + CB_ENSURE(Count(featuresToEvaluate, featureSet) == 1, "All tested feature sets must be different"); + } + const auto featureEvalSummary = EvaluateFeatures( catBoostFlatJsonOptions, featureEvalOptions,
Updated building instructions, use boost 1.78
@@ -22,11 +22,11 @@ git submodule update --init --remote --recursive Download and set up 'boost' library: ``` -curl -o boost_1_77_0.zip -L https://sourceforge.net/projects/boost/files/boost/1.77.0/boost_1_77_0.zip/download -unzip boost_1_77_0.zip +curl -o boost_1_78_0.zip -L https://sourceforge.net/projects/boost/files/boost/1.78.0/boost_1_78_0.zip/download +unzip boost_1_78_0.zip cd libs-external -ln -s ../boost_1_77_0 boost -cd ../boost_1_77_0 +ln -s ../boost_1_78_0 boost +cd ../boost_1_78_0 ./bootstrap.sh ./b2 headers cd ..
fixed gradle version check to work with numbers not including patch version
@@ -40,7 +40,7 @@ if (Java_JAVAC_EXECUTABLE) if (GRADLE_EXECUTABLE) # set by find_program # check Gradle version execute_process ( - COMMAND bash "-c" "${GRADLE_EXECUTABLE} -v | grep 'Gradle *' | egrep -o '[0-9]+\.[0-9]+\.[0-9]+'" + COMMAND bash "-c" "${GRADLE_EXECUTABLE} -v | grep 'Gradle *' | egrep -o '[0-9]+\.[0-9]+(\.[0-9]+)?'" OUTPUT_VARIABLE GRADLE_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
[hardware] Recompile hardware if the configuration changed
@@ -21,7 +21,8 @@ MEMPOOL_DIR := $(shell git rev-parse --show-toplevel 2>/dev/null || echo $$MEMPO INSTALL_DIR := $(abspath $(ROOT_DIR)/../install) # Include configuration -include $(abspath $(ROOT_DIR)/../config/config.mk) +config_mk = $(abspath $(ROOT_DIR)/../config/config.mk) +include $(config_mk) # build path buildpath ?= build @@ -100,7 +101,7 @@ $(buildpath)/$(library): # Compilation .PHONY: compile compile: dpi lib $(buildpath) $(buildpath)/compile.tcl -$(buildpath)/compile.tcl: bender $(shell find src -type f) $(shell find tb -type f) $(shell find deps -type f) +$(buildpath)/compile.tcl: bender $(config_mk) $(shell find src -type f) $(shell find tb -type f) $(shell find deps -type f) ./bender script vsim --vlog-arg="$(vlog_args)" -t rtl -t asic -t mempool_test > $(buildpath)/compile.tcl echo "exit" >> $(buildpath)/compile.tcl cd $(buildpath) && $(questa_cmd) vsim -work $(library) -c -do compile.tcl
travis: add sig-ecdsa + enc-ec256 to sim
@@ -35,7 +35,7 @@ matrix: - os: linux env: MULTI_FEATURES="sig-ecdsa enc-kw validate-primary-slot" TEST=sim - os: linux - env: MULTI_FEATURES="sig-rsa validate-primary-slot overwrite-only" TEST=sim + env: MULTI_FEATURES="sig-rsa validate-primary-slot overwrite-only,sig-ecdsa enc-ec256 validate-primary-slot" TEST=sim - os: linux language: go
prevent the rpl root from dropping packets bound for outside the dodag while in NS mode
@@ -644,11 +644,17 @@ rpl_update_header(void) /* At the root, remove headers if any, and insert SRH or HBH * (SRH is inserted only if the destination is in the DODAG) */ rpl_remove_header(); + if(rpl_get_dag(&UIP_IP_BUF->destipaddr) != NULL) { + /* dest is in a DODAG; the packet is going down. */ if(RPL_IS_NON_STORING(default_instance)) { return insert_srh_header(); } else { return insert_hbh_header(default_instance); } + } else { + /* dest is outside of DODAGs; no ext header is needed. */ + return 1; + } } else { if(uip_ds6_is_my_addr(&UIP_IP_BUF->srcipaddr) && UIP_IP_BUF->ttl == uip_ds6_if.cur_hop_limit) {
Static strings should be reference counted in debug mode This patch helps to find out invalid reference count usage for ecma-strings. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik
@@ -822,10 +822,17 @@ ecma_ref_ecma_string (ecma_string_t *string_p) /**< string descriptor */ { JERRY_ASSERT (string_p != NULL); - if (ECMA_IS_DIRECT_STRING (string_p) || ECMA_STRING_IS_STATIC (string_p)) + if (ECMA_IS_DIRECT_STRING (string_p)) + { + return; + } + +#ifdef JERRY_NDEBUG + if (ECMA_STRING_IS_STATIC (string_p)) { return; } +#endif /* JERRY_NDEBUG */ JERRY_ASSERT (string_p->refs_and_container >= ECMA_STRING_REF_ONE); @@ -849,10 +856,17 @@ ecma_deref_ecma_string (ecma_string_t *string_p) /**< ecma-string */ { JERRY_ASSERT (string_p != NULL); - if (ECMA_IS_DIRECT_STRING (string_p) || ECMA_STRING_IS_STATIC (string_p)) + if (ECMA_IS_DIRECT_STRING (string_p)) + { + return; + } + +#ifdef JERRY_NDEBUG + if (ECMA_STRING_IS_STATIC (string_p)) { return; } +#endif /* JERRY_NDEBUG */ JERRY_ASSERT (string_p->refs_and_container >= ECMA_STRING_REF_ONE);
oc_obt: Add missing NULL check
@@ -868,6 +868,10 @@ obt_discovery_cb(const char *anchor, const char *uri, oc_string_array_t types, if (strlen(t) == 10 && strncmp(t, "oic.r.doxm", 10) == 0) { oc_endpoint_t *ep = get_unsecure_endpoint(endpoint); oc_device_t *device = oc_memb_alloc(&oc_devices_s); + if (!device) { + oc_free_server_endpoints(endpoint); + return OC_STOP_DISCOVERY; + } memcpy(device->uuid.id, uuid.id, 16); device->endpoint = endpoint; oc_set_delayed_callback(device, free_device, DISCOVERY_CB_DELAY + 2);
output: fix variable definition if metrics are disabled
@@ -528,7 +528,9 @@ const char *flb_output_get_property(const char *key, struct flb_output_instance int flb_output_init(struct flb_config *config) { int ret; +#ifdef FLB_HAVE_METRICS const char *name; +#endif struct mk_list *tmp; struct mk_list *head; struct mk_list *config_map;
Fix test_dtd_default_handling() to work for
@@ -1970,7 +1970,7 @@ START_TEST(test_dtd_default_handling) XML_SetCommentHandler(parser, dummy_comment_handler); XML_SetStartCdataSectionHandler(parser, dummy_start_cdata_handler); XML_SetEndCdataSectionHandler(parser, dummy_end_cdata_handler); - run_character_check(text, "\n\n\n\n\n\n\n<doc/>"); + run_character_check(text, XCS("\n\n\n\n\n\n\n<doc/>")); } END_TEST
usb/ft232r: fixed build issue 1. fixed build issue; 2. make sure the read data length must greater than or equal to 2;
@@ -1180,7 +1180,7 @@ static void usbhost_rxdata_work(FAR void *arg) nread = DRVR_TRANSFER(hport->drvr, priv->bulkin, priv->inbuf, priv->pktsize); - if (nread < 0) + if (nread < 2) { /* The most likely reason for a failure is that the has no * data available now and NAK'ed the IN token OR that the @@ -2584,7 +2584,7 @@ static bool usbhost_rxflowcontrol(FAR struct uart_dev_s *uartdev, int ret; DEBUGASSERT(uartdev && uartdev->priv); - priv = (FAR struct usbhost_ft232r_s *)uartdev->priv + priv = (FAR struct usbhost_ft232r_s *)uartdev->priv; /* Is RX flow control enabled? */
Rename oret to expected_ret
@@ -213,7 +213,7 @@ exit: /* BEGIN_CASE */ void mpi_mod_add( char * input_N, char * input_A, char * input_B, - char * input_S, int oret ) + char * input_S, int expected_ret ) { mbedtls_mpi_mod_residue a = { NULL, 0 }; mbedtls_mpi_mod_residue b = { NULL, 0 }; @@ -230,9 +230,9 @@ void mpi_mod_add( char * input_N, /* test_read_residue() normally checks that inputs have the same number of * limbs as the modulus. For negative testing we can ask it to skip this * with a non-zero final parameter. */ - TEST_EQUAL( 0, test_read_residue( &a, &m, input_A, oret != 0 ) ); - TEST_EQUAL( 0, test_read_residue( &b, &m, input_B, oret != 0 ) ); - TEST_EQUAL( 0, test_read_residue( &s, &m, input_S, oret != 0 ) ); + TEST_EQUAL( 0, test_read_residue( &a, &m, input_A, expected_ret != 0 ) ); + TEST_EQUAL( 0, test_read_residue( &b, &m, input_B, expected_ret != 0 ) ); + TEST_EQUAL( 0, test_read_residue( &s, &m, input_S, expected_ret != 0 ) ); size_t limbs = m.limbs; size_t bytes = limbs * sizeof( *X_raw ); @@ -240,7 +240,7 @@ void mpi_mod_add( char * input_N, /* One spare limb for negative testing */ ASSERT_ALLOC( X_raw, limbs + 1 ); - if( oret == 0 ) + if( expected_ret == 0 ) { /* Negative test with too many limbs in output */ x.p = X_raw; @@ -264,8 +264,8 @@ void mpi_mod_add( char * input_N, TEST_EQUAL( 0, mbedtls_mpi_mod_residue_setup( &x, &m, X_raw, limbs ) ); /* A + B => Correct result or expected error */ - TEST_EQUAL( oret, mbedtls_mpi_mod_add( &x, &a, &b, &m ) ); - if( oret != 0 ) + TEST_EQUAL( expected_ret, mbedtls_mpi_mod_add( &x, &a, &b, &m ) ); + if( expected_ret != 0 ) goto exit; TEST_COMPARE_MPI_RESIDUES( x, s );
Use __BYTE_ORDER__ to test the endianness when available GH:
#ifndef OSSL_INTERNAL_ENDIAN_H # define OSSL_INTERNAL_ENDIAN_H +/* + * IS_LITTLE_ENDIAN and IS_BIG_ENDIAN can be used to detect the endiannes + * at compile time. To use it, DECLARE_IS_ENDIAN must be used to declare + * a variable. + * + * L_ENDIAN and B_ENDIAN can be used at preprocessor time. They can be set + * in the configarion using the lib_cppflags variable. If neither is + * set, it will fall back to code works with either endianness. + */ + +# if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) +# define DECLARE_IS_ENDIAN const int ossl_is_little_endian = __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define IS_LITTLE_ENDIAN (ossl_is_little_endian) +# define IS_BIG_ENDIAN (!ossl_is_little_endian) +# if defined(L_ENDIAN) && (__BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__) +# error "L_ENDIAN defined on a big endian machine" +# endif +# if defined(B_ENDIAN) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) +# error "B_ENDIAN defined on a little endian machine" +# endif +# if !defined(L_ENDIAN) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) +# define L_ENDIAN +# endif +# if !defined(B_ENDIAN) && (__BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__) +# define B_ENDIAN +# endif +# else # define DECLARE_IS_ENDIAN \ const union { \ long one; \ # define IS_LITTLE_ENDIAN (ossl_is_endian.little != 0) # define IS_BIG_ENDIAN (ossl_is_endian.little == 0) +# endif #endif
portenta specific fixes to share I2C with camera
@@ -237,8 +237,45 @@ void sensor_init0() // Set default quality JPEG_FB()->quality = ((JPEG_QUALITY_HIGH - JPEG_QUALITY_LOW) / 2) + JPEG_QUALITY_LOW; +#ifdef PORTENTA + I2C_HandleTypeDef i2c; + /* Configure I2C */ + + i2c.Instance = SCCB_I2C; + i2c.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT; + i2c.Init.Timing = SCCB_TIMING; + i2c.Init.DualAddressMode = I2C_DUALADDRESS_DISABLED; + i2c.Init.GeneralCallMode = I2C_GENERALCALL_DISABLED; + i2c.Init.NoStretchMode = I2C_NOSTRETCH_DISABLED; + i2c.Init.OwnAddress1 = 0xFE; + i2c.Init.OwnAddress2 = 0xFE; + + HAL_I2C_Init(&i2c); + + if (SCCB_TIMING == I2C_TIMING_FAST) { + // Enable FAST mode plus. + if (SCCB_I2C == I2C1) { + #if defined(I2C_FASTMODEPLUS_I2C1) + HAL_I2CEx_EnableFastModePlus(I2C_FASTMODEPLUS_I2C1); + #endif + } else if (SCCB_I2C == I2C2) { + #if defined(I2C_FASTMODEPLUS_I2C2) + HAL_I2CEx_EnableFastModePlus(I2C_FASTMODEPLUS_I2C2); + #endif + } else if (SCCB_I2C == I2C3) { + #if defined(I2C_FASTMODEPLUS_I2C3) + HAL_I2CEx_EnableFastModePlus(I2C_FASTMODEPLUS_I2C3); + #endif + } else { + #if defined(I2C_FASTMODEPLUS_I2C4) + HAL_I2CEx_EnableFastModePlus(I2C_FASTMODEPLUS_I2C4); + #endif + } + } +#endif // Set fb_enabled JPEG_FB()->enabled = fb_enabled; // controlled by the IDE. + } int sensor_init()
nshlib: Add Apache License The initial contribution was missing a license.
+/*************************************************************************** + * apps/nshlib/nsh_romfsimg.h + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + ***************************************************************************/ + const unsigned char romfs_img[] = { 0x2d, 0x72, 0x6f, 0x6d, 0x31, 0x66, 0x73, 0x2d, 0x00, 0x00, 0x01, 0x50, 0x9f, 0x13, 0x82, 0x87, 0x4e, 0x53, 0x48, 0x49, 0x6e, 0x69, 0x74, 0x56,
Update serial.h correct definition of struct serial_configure
@@ -100,7 +100,7 @@ struct serial_configure rt_uint32_t bit_order :1; rt_uint32_t invert :1; rt_uint32_t bufsz :16; - rt_uint32_t reserved :4; + rt_uint32_t reserved :6; }; /*
Make Matthijs alumni ldns maintainer
@@ -51,11 +51,11 @@ ldns is developed by the ldns team at NLnet Labs. This team currently consists of: o Willem Toorop o Wouter Wijngaards - o Matthijs Mekking Former main developers: o Jelte Jansen o Miek Gieben + o Matthijs Mekking * Credits We have received patches from the following people, thanks!
magister: modify ADC volume button thresholds change volume up/down of ADC thresholds value. BRANCH=master TEST=Press Vol+- button function work.
@@ -978,16 +978,16 @@ static void adc_vol_key_press_check(void) static uint8_t old_adc_key_state; uint8_t adc_key_state_change; - if (volt > 2400 && volt < 2490) { + if (volt > 2400 && volt < 2540) { /* volume-up is pressed */ new_adc_key_state = ADC_VOL_UP_MASK; - } else if (volt > 2600 && volt < 2690) { + } else if (volt > 2600 && volt < 2740) { /* volume-down is pressed */ new_adc_key_state = ADC_VOL_DOWN_MASK; - } else if (volt < 2290) { + } else if (volt < 2300) { /* both volumn-up and volume-down are pressed */ new_adc_key_state = ADC_VOL_UP_MASK | ADC_VOL_DOWN_MASK; - } else if (volt > 2700) { + } else if (volt > 2780) { /* both volumn-up and volume-down are released */ new_adc_key_state = 0; }
BugID:24827808: Rework aosmk check directory list.
@@ -18,9 +18,8 @@ Check component's makefile aos.mk. """ % name SKIP_CHECK = { - "global_includes": ["/board/", "/platform/", "/2ndboot/", "/kernel/", - "/security/", "/3rdparty/", "/utility/", "/tools/", - "/test/" + "global_includes": ["/core_rtos/", "/platform/", "/components/dm/ota/2ndboot/", "/core/", + "/components/security/", "/3rdparty/", "/tools/", "/test/" ], }
Sync: Use fences for code snippets
@@ -21,14 +21,19 @@ add this plugin. Just add this plugin to the list of plugins during mounting, e.g. +```sh kdb mount file.dump /important dump sync +``` Then when you observe the change of a value, e.g. +```sh strace kdb set user/important/key value +``` you can see, done by storage: +``` open("/home/markus/.kdb/file.dump.16874:1409592592.95084.tmp", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4 write(4, "kdbOpen 1\n", 10) = 10 @@ -38,16 +43,20 @@ you can see, done by storage: write(4, "keyEnd\n", 7) = 7 write(4, "ksEnd\n", 6) = 6 close(4) = 0 +``` then done by sync: +``` open("/home/markus/.kdb/file.dump.16874:1409592592.95084.tmp", O_RDWR) = 4 fsync(4) = 0 close(4) = 0 +``` and finally commit + sync of directory by resolver: +``` rename("/home/markus/.kdb/file.dump.16874:1409592592.95084.tmp", "/home/markus/.kdb/file.dump") = 0 stat("/home/markus/.kdb/file.dump", {st_mode=S_IFREG|0644, @@ -58,3 +67,4 @@ and finally commit + sync of directory by resolver: open("/home/markus/.kdb", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3 fsync(3) = 0 +```
fix a few performance drop in some matrix size per data type
@@ -1507,8 +1507,13 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define SYMV_P 8 -#define SWITCH_RATIO 32 -#define GEMM_PREFERED_SIZE 16 +#if defined(XDOUBLE) || defined(DOUBLE) +#define SWITCH_RATIO 4 +#define GEMM_PREFERED_SIZE 4 +#else +#define SWITCH_RATIO 8 +#define GEMM_PREFERED_SIZE 8 +#endif #ifdef ARCH_X86 @@ -1627,8 +1632,13 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define SYMV_P 8 -#define SWITCH_RATIO 32 -#define GEMM_PREFERED_SIZE 32 +#if defined(XDOUBLE) || defined(DOUBLE) +#define SWITCH_RATIO 8 +#define GEMM_PREFERED_SIZE 8 +#else +#define SWITCH_RATIO 16 +#define GEMM_PREFERED_SIZE 16 +#endif #define USE_SGEMM_KERNEL_DIRECT 1 #ifdef ARCH_X86
odissey: reply incorrect console query text
@@ -654,29 +654,38 @@ od_console_query(od_console_t *console, od_msgconsole_t *msg_console) break; case OD_PARSER_EOF: default: - goto bad_command; + goto bad_query; } od_keyword_t *keyword; keyword = od_keyword_match(od_console_keywords, &token); if (keyword == NULL) - goto bad_command; + goto bad_query; switch (keyword->id) { case OD_LSHOW: rc = od_console_query_show(client, &parser); if (rc == -1) - goto bad_command; + goto bad_query; break; case OD_LSET: rc = od_console_query_set(client, &parser); if (rc == -1) - goto bad_command; + goto bad_query; break; default: - goto bad_command; + goto bad_query; } return 0; +bad_query: + od_error_client(&instance->logger, &client->id, "console", + "bad console command: %.*s", query_len, query); + shapito_stream_reset(&client->stream); + od_frontend_errorf(client, SHAPITO_SYNTAX_ERROR, "bad console command: %.*s", + query_len, query); + shapito_be_write_ready(&client->stream, 'I'); + return -1; + bad_command: od_error_client(&instance->logger, &client->id, "console", "bad console command");
add SPI_PORTS to nfe_breadboard
#define F4 #define F405 +//PORTS +#define SPI_PORTS \ + SPI1_PA5PA6PA7 \ + SPI2_PB13B14B15 \ + SPI3_PB3PB4PB5 + +#define USART_PORTS \ + USART1_PA10PA9 \ + USART2_PA3PA2 \ + USART3_PC11PC10 + //LEDS #define LED_NUMBER 2 #define LED1PIN GPIO_Pin_12 #define SENSOR_ROTATE_90_CCW //RADIO -#define USART_PORTS \ - USART1_PA10PA9 \ - USART2_PA3PA2 \ - USART3_PC11PC10 - #ifdef SERIAL_RX #define RX_USART USART_PORT1 #define SOFTSPI_NONE
servo_v4: Fix buffer overflow src_pdo_charge[] size may exceed 2, but remove it instead. TEST=On servo_v4, verify DTS always works. BRANCH=servo Commit-Ready: Shawn N Tested-by: Shawn N
@@ -59,7 +59,6 @@ struct vbus_prop { int ma; }; static struct vbus_prop vbus[CONFIG_USB_PD_PORT_COUNT]; -static struct vbus_prop src_pdo_charge[2]; static int active_charge_port = CHARGE_PORT_NONE; static enum charge_supplier active_charge_supplier; static uint8_t vbus_rp = TYPEC_RP_RESERVED; @@ -177,13 +176,11 @@ static void update_ports(void) snk_index = pdo_index; pd_extract_pdo_power(pdo, &max_ma, &max_mv); - pd_src_chg_pdo[src_index] = + pd_src_chg_pdo[src_index++] = PDO_FIXED_VOLT(max_mv) | PDO_FIXED_CURR(max_ma) | DUT_PDO_FIXED_FLAGS | PDO_FIXED_EXTERNAL; - src_pdo_charge[src_index].mv = max_mv; - src_pdo_charge[src_index++].ma = max_ma; } chg_pdo_cnt = src_index; } else { @@ -192,8 +189,6 @@ static void update_ports(void) PDO_FIXED_CURR(vbus[CHG].ma) | DUT_PDO_FIXED_FLAGS | PDO_FIXED_EXTERNAL; - src_pdo_charge[0].mv = PD_MIN_MV; - src_pdo_charge[0].ma = vbus[CHG].ma; chg_pdo_cnt = 1; } @@ -430,8 +425,9 @@ int pd_is_valid_input_voltage(int mv) void pd_transition_voltage(int idx) { timestamp_t deadline; - uint32_t mv = src_pdo_charge[idx - 1].mv; + uint32_t ma, mv; + pd_extract_pdo_power(pd_src_chg_pdo[idx - 1], &ma, &mv); /* Is this a transition to a new voltage? */ if (charge_port_is_active() && vbus[CHG].mv != mv) { /*
Removed unused variable. Closes
@@ -370,15 +370,12 @@ u3a_reflux(void) void u3a_reclaim(void) { - c3_w old_w; - if ( (0 == u3R->cax.har_p) || (0 == u3to(u3h_root, u3R->cax.har_p)->use_w) ) { fprintf(stderr, "allocate: reclaim: memo cache: empty\r\n"); u3m_bail(c3__meme); } - old_w = u3a_open(u3R) + u3R->all.fre_w; #if 1 fprintf(stderr, "allocate: reclaim: half of %d entries\r\n",
add -c cmdline option for task lua
@@ -45,8 +45,17 @@ task("lua") return end + -- run command? + local cmd = option.get("command") + local name = nil + if cmd then + local tmpfile = os.tmpfile() .. ".lua" + io.writefile(tmpfile, "function main()\n" .. cmd .. "\nend") + name = tmpfile + end + -- get script name - local name = option.get("script") + name = name or option.get("script") if name then -- import and run script @@ -77,6 +86,7 @@ task("lua") { {'l', "list", "k", nil, "List all scripts." } , {nil, "root", "k", nil, "Allow to run script as root." } + , {'c', "command", "kv", nil, "Run command" } , {nil, "script", "v", nil, "Run the given lua script." } , {nil, "arguments", "vs", nil, "The script arguments." } }
mpich: removing separate installation of hydra; it looks to not cooperate with pmix
BuildRequires: slurm-devel%{PROJ_DELIM} slurm%{PROJ_DELIM} %endif -%define with_pmix 1 +%{!?with_pmix: %define with_pmix 0} %if 0%{with_pmix} BuildRequires: pmix%{PROJ_DELIM} BuildRequires: libevent-devel @@ -71,25 +71,11 @@ module load pmix make %{?_smp_mflags} -# enable hydra as backup job launch for non pmix aware resource managers -%if 0%{with_pmix} -pushd src/pm/hydra -./configure --prefix=%{install_path} -make %{?_smp_mflags} -popd -%endif - %install # OpenHPC compiler designation %ohpc_setup_compiler make %{?_smp_mflags} DESTDIR=$RPM_BUILD_ROOT install -# install hydra as backup job launch for non pmix aware resource managers -%if 0%{with_pmix} -pushd src/pm/hydra -make %{?_smp_mflags} DESTDIR=$RPM_BUILD_ROOT install -popd -%endif # Remove .la files detected by rpm rm $RPM_BUILD_ROOT/%{install_path}/lib/*.la @@ -115,7 +101,9 @@ module-whatis "URL: %{url}" set version %{version} setenv MPI_DIR %{install_path} +%if 0%{with_pmix} setenv OHPC_MPI_LAUNCHERS pmix +%endif prepend-path PATH %{install_path}/bin prepend-path MANPATH %{install_path}/share/man prepend-path LD_LIBRARY_PATH %{install_path}/lib
Fix inline declaration in intra_mode_encryption Moves the inline declaration of intra_mode_encryption before the type and changes it to use the INLINE macro. Inline declaration after type triggered a warning on GCC.
@@ -673,7 +673,7 @@ static void encode_inter_prediction_unit(encoder_state_t * const state, } #if KVZ_SEL_ENCRYPTION -static uint8_t inline intra_mode_encryption(encoder_state_t * const state, +static INLINE uint8_t intra_mode_encryption(encoder_state_t * const state, uint8_t intra_pred_mode) { const uint8_t sets[3][17] =
stream reuse, clean links on structs that are unlinked from a list.
@@ -370,6 +370,8 @@ static struct waiting_tcp* reuse_write_wait_pop(struct reuse_tcp* reuse) w->write_wait_next->write_wait_prev = NULL; else reuse->write_wait_last = NULL; w->write_wait_queued = 0; + w->write_wait_next = NULL; + w->write_wait_prev = NULL; return w; } @@ -394,6 +396,8 @@ static void reuse_write_wait_remove(struct reuse_tcp* reuse, log_assert(!w->write_wait_next || w->write_wait_next->write_wait_prev != w->write_wait_next); w->write_wait_queued = 0; + w->write_wait_next = NULL; + w->write_wait_prev = NULL; } /** push the element after the last on the writewait list */ @@ -1005,7 +1009,10 @@ reuse_tcp_remove_tree_list(struct outside_network* outnet, log_assert((!outnet->tcp_reuse_first && !outnet->tcp_reuse_last) || (outnet->tcp_reuse_first && outnet->tcp_reuse_last)); reuse->item_on_lru_list = 0; + reuse->lru_next = NULL; + reuse->lru_prev = NULL; } + reuse->pending = NULL; } /** helper function that deletes an element from the tree of readwait @@ -1745,8 +1752,10 @@ outside_network_delete(struct outside_network* outnet) } comm_point_delete(outnet->tcp_conns[i]->c); free(outnet->tcp_conns[i]); + outnet->tcp_conns[i] = NULL; } free(outnet->tcp_conns); + outnet->tcp_conns = NULL; } if(outnet->tcp_wait_first) { struct waiting_tcp* p = outnet->tcp_wait_first, *np; @@ -2161,6 +2170,8 @@ reuse_tcp_close_oldest(struct outside_network* outnet) log_assert((!outnet->tcp_reuse_first && !outnet->tcp_reuse_last) || (outnet->tcp_reuse_first && outnet->tcp_reuse_last)); pend->reuse.item_on_lru_list = 0; + pend->reuse.lru_next = NULL; + pend->reuse.lru_prev = NULL; /* free up */ reuse_cb_and_decommission(outnet, pend, NETEVENT_CLOSED);
links: prevent duplicate link submissions Adds a disabled check during link submission to prevent duplicates. Also fixes an unmarked bug where 'linkValid' was not being reset to false on submission, allowing for submitting blank links after one correct link has been submitted.
@@ -8,7 +8,8 @@ export class LinkSubmit extends Component { linkValue: "", linkTitle: "", linkValid: false, - submitFocus: false + submitFocus: false, + disabled: false }; this.setLinkValue = this.setLinkValue.bind(this); this.setLinkTitle = this.setLinkTitle.bind(this); @@ -20,9 +21,15 @@ export class LinkSubmit extends Component { ? this.state.linkTitle : this.state.linkValue; api.setSpinner(true); + this.setState({disabled: true}) api.postLink(this.props.resourcePath, link, title).then(r => { api.setSpinner(false); - this.setState({ linkValue: "", linkTitle: "" }); + this.setState({ + disabled: false, + linkValue: "", + linkTitle: "", + linkValid: false + }); }); } @@ -56,7 +63,8 @@ export class LinkSubmit extends Component { } render() { - let activeClasses = this.state.linkValid ? "green2 pointer" : "gray2"; + let activeClasses = (this.state.linkValid && !this.state.disabled) + ? "green2 pointer" : "gray2"; let focus = (this.state.submitFocus) ? "b--black b--white-d" @@ -110,7 +118,7 @@ export class LinkSubmit extends Component { className={ "absolute bg-gray0-d f8 ml2 flex-shrink-0 " + activeClasses } - disabled={!this.state.linkValid} + disabled={!this.state.linkValid || this.state.disabled} onClick={this.onClickPost.bind(this)} style={{ bottom: 12,
tiny printing tweak
@@ -684,9 +684,8 @@ static scs_float proj_box_cone(scs_float *tx, const scs_float *bl, } t = MAX(t - gt / MAX(ht, 1e-8), 0.); /* newton step */ #if VERBOSITY > 3 - scs_printf("t warm start: %1.3e, t[0]: %1.3e\n", t_warm_start, tx[0]); - scs_printf("t_new %1.3e, t_prev %1.3e, gt %1.3e, ht %1.3e\n", t, t_prev, gt, - ht); + scs_printf("iter %i, t_new %1.3e, t_prev %1.3e, gt %1.3e, ht %1.3e\n", iter, + t, t_prev, gt, ht); scs_printf("ABS(gt / (ht + 1e-6)) %.4e, ABS(t - t_prev) %.4e\n", ABS(gt / (ht + 1e-6)), ABS(t - t_prev)); #endif
NODE: fix node build on osx for node 4 & 6 On OSX, node 4 and node 6 do not compile with C++11 by default. Needed to add xcode_settings to force C++11 compilation to allow for smart pointers
'sources': [ 'src/mongocrypt.cc' ], + 'xcode_settings': { + 'OTHER_CFLAGS': [ + "-std=c++11", + "-stdlib=libc++", + "-mmacosx-version-min=10.12" + ], + }, 'conditions': [ ['build_type=="dynamic"', { 'link_settings': {
lets try making it single threaded
/* #define JANET_BUILD "local" */ /* These settings all affect linking, so use cautiously. */ -/* #define JANET_SINGLE_THREADED */ +#define JANET_SINGLE_THREADED #define JANET_NO_DYNAMIC_MODULES /* #define JANET_NO_NANBOX */ /* #define JANET_API __attribute__((visibility ("default"))) */
fix: move json_extract() responsible for fetching session_id from outside of on_ready_cb
@@ -648,11 +648,7 @@ on_voice_server_update(struct discord_gateway *gw, struct sized_buffer *data) } static void -on_ready(struct discord_gateway *gw, struct sized_buffer *data) -{ - json_extract(data->start, data->size, "(session_id):s", gw->session_id); - ASSERT_S(gw->session_id, "Missing session_id from READY event"); - +on_ready(struct discord_gateway *gw, struct sized_buffer *data) { (*gw->cbs.on_ready)(gw->p_client, gw->bot); } @@ -828,6 +824,9 @@ on_dispatch(struct discord_gateway *gw) break; case DISCORD_GATEWAY_EVENTS_READY: log_info("Succesfully started a Discord session!"); + json_extract(gw->payload.event_data.start, gw->payload.event_data.size, "(session_id):s", gw->session_id); + ASSERT_S(!IS_EMPTY_STRING(gw->session_id), "Missing session_id from READY event"); + gw->is_ready = true; gw->reconnect.attempt = 0; if (gw->cbs.on_ready)
Rename clap_client_tuning to clap_plugin_tuning Fixes
@@ -27,11 +27,11 @@ typedef struct clap_tuning_info { bool is_dynamic; // true if the values may vary with time } clap_tuning_info_t; -typedef struct clap_client_tuning { +typedef struct clap_plugin_tuning { // Called when a tuning is added or removed from the pool. // [main-thread] void (*changed)(const clap_plugin_t *plugin); -} clap_client_tuning_t; +} clap_plugin_tuning_t; // This extension provides a dynamic tuning table to the plugin. typedef struct clap_host_tuning {
Also fail when the user provides a preview image that has a zero size coordinate oss fuzz 39399
@@ -720,7 +720,7 @@ extract_attr_preview ( sz[0], sz[1]); - if (fsize > 0 && bytes >= (uint64_t) fsize) + if (bytes == 0 || (fsize > 0 && bytes >= (uint64_t) fsize)) { return ctxt->print_error ( ctxt,
driver/stm_mems_common.c: Format with clang-format BRANCH=none TEST=none
/** * st_raw_read_n - Read n bytes for read */ -int st_raw_read_n(const int port, - const uint16_t i2c_addr_flags, +int st_raw_read_n(const int port, const uint16_t i2c_addr_flags, const uint8_t reg, uint8_t *data_ptr, const int len) { /* TODO: Implement SPI interface support */ - return i2c_read_block(port, i2c_addr_flags, - reg | 0x80, data_ptr, len); + return i2c_read_block(port, i2c_addr_flags, reg | 0x80, data_ptr, len); } /** * st_raw_read_n_noinc - Read n bytes for read (no auto inc address) */ -int st_raw_read_n_noinc(const int port, - const uint16_t i2c_addr_flags, +int st_raw_read_n_noinc(const int port, const uint16_t i2c_addr_flags, const uint8_t reg, uint8_t *data_ptr, const int len) { /* TODO: Implement SPI interface support */ - return i2c_read_block(port, i2c_addr_flags, - reg, data_ptr, len); + return i2c_read_block(port, i2c_addr_flags, reg, data_ptr, len); } /** @@ -45,19 +41,17 @@ int st_write_data_with_mask(const struct motion_sensor_t *s, int reg, int err; int new_data = 0x00, old_data = 0x00; - err = st_raw_read8(s->port, s->i2c_spi_addr_flags, - reg, &old_data); + err = st_raw_read8(s->port, s->i2c_spi_addr_flags, reg, &old_data); if (err != EC_SUCCESS) return err; - new_data = ((old_data & (~mask)) | - ((data << __builtin_ctz(mask)) & mask)); + new_data = + ((old_data & (~mask)) | ((data << __builtin_ctz(mask)) & mask)); if (new_data == old_data) return EC_SUCCESS; - return st_raw_write8(s->port, s->i2c_spi_addr_flags, - reg, new_data); + return st_raw_write8(s->port, s->i2c_spi_addr_flags, reg, new_data); } /** @@ -77,8 +71,8 @@ int st_get_resolution(const struct motion_sensor_t *s) * @offset: offset vector * @temp: Temp */ -int st_set_offset(const struct motion_sensor_t *s, - const int16_t *offset, int16_t temp) +int st_set_offset(const struct motion_sensor_t *s, const int16_t *offset, + int16_t temp) { struct stprivate_data *data = s->drv_data; @@ -94,8 +88,8 @@ int st_set_offset(const struct motion_sensor_t *s, * @offset: offset vector * @temp: Temp */ -int st_get_offset(const struct motion_sensor_t *s, - int16_t *offset, int16_t *temp) +int st_get_offset(const struct motion_sensor_t *s, int16_t *offset, + int16_t *temp) { struct stprivate_data *data = s->drv_data;
Make EVP_*Final work for CCM ciphers
@@ -2129,6 +2129,10 @@ static int aes_ccm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, if (cctx->tls_aad_len >= 0) return aes_ccm_tls_cipher(ctx, out, in, len); + /* EVP_*Final() doesn't return any data */ + if (in == NULL && out != NULL) + return 0; + if (!cctx->iv_set) return -1; @@ -2148,9 +2152,6 @@ static int aes_ccm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, CRYPTO_ccm128_aad(ccm, in, len); return len; } - /* EVP_*Final() doesn't return any data */ - if (!in) - return 0; /* If not set length yet do it */ if (!cctx->len_set) { if (CRYPTO_ccm128_setiv(ccm, EVP_CIPHER_CTX_iv_noconst(ctx),
unix/Makefile: Build libffi inside $BUILD. Avoids polluting the source tree, allows to build for different (sub)archs without intermediate cleaning.
@@ -107,11 +107,11 @@ endif ifeq ($(MICROPY_PY_FFI),1) ifeq ($(MICROPY_STANDALONE),1) -LIBFFI_CFLAGS_MOD := -I$(shell ls -1d $(TOP)/lib/libffi/build_dir/out/lib/libffi-*/include) +LIBFFI_CFLAGS_MOD := -I$(shell ls -1d $(BUILD)/lib/libffi/out/lib/libffi-*/include) ifeq ($(MICROPY_FORCE_32BIT),1) - LIBFFI_LDFLAGS_MOD = $(TOP)/lib/libffi/build_dir/out/lib32/libffi.a + LIBFFI_LDFLAGS_MOD = $(BUILD)/lib/libffi/out/lib32/libffi.a else - LIBFFI_LDFLAGS_MOD = $(TOP)/lib/libffi/build_dir/out/lib/libffi.a + LIBFFI_LDFLAGS_MOD = $(BUILD)/lib/libffi/out/lib/libffi.a endif else LIBFFI_CFLAGS_MOD := $(shell pkg-config --cflags libffi) @@ -270,13 +270,16 @@ endif deplibs: libffi axtls +libffi: $(BUILD)/lib/libffi/include/ffi.h + +$(TOP)/lib/libffi/configure: $(TOP)/lib/libffi/autogen.sh + cd $(TOP)/lib/libffi; ./autogen.sh + # install-exec-recursive & install-data-am targets are used to avoid building # docs and depending on makeinfo -libffi: - cd $(TOP)/lib/libffi; git clean -d -x -f - cd $(TOP)/lib/libffi; ./autogen.sh - mkdir -p $(TOP)/lib/libffi/build_dir; cd $(TOP)/lib/libffi/build_dir; \ - ../configure $(CROSS_COMPILE_HOST) --prefix=$$PWD/out --disable-structs CC="$(CC)" CXX="$(CXX)" LD="$(LD)" CFLAGS="-Os -fomit-frame-pointer -fstrict-aliasing -ffast-math -fno-exceptions"; \ +$(BUILD)/lib/libffi/include/ffi.h: $(TOP)/lib/libffi/configure + mkdir -p $(BUILD)/lib/libffi; cd $(BUILD)/lib/libffi; \ + $(abspath $(TOP))/lib/libffi/configure $(CROSS_COMPILE_HOST) --prefix=$$PWD/out --disable-structs CC="$(CC)" CXX="$(CXX)" LD="$(LD)" CFLAGS="-Os -fomit-frame-pointer -fstrict-aliasing -ffast-math -fno-exceptions"; \ $(MAKE) install-exec-recursive; $(MAKE) -C include install-data-am axtls: $(TOP)/lib/axtls/README
Add/use defines for max buffer size and path len Use PATH_MAX for max configfs path len. Add define for max configfs buffer size.
#include "libtcmu_priv.h" #define CFGFS_CORE "/sys/kernel/config/target/core" +#define CFGFS_BUF_SIZE 4096 static int tcmu_get_cfgfs_int(const char *path) { @@ -77,8 +78,8 @@ int tcmu_get_attribute(struct tcmu_device *dev, const char *name) char *tcmu_get_wwn(struct tcmu_device *dev) { int fd; - char path[256]; - char buf[256]; + char path[PATH_MAX]; + char buf[CFGFS_BUF_SIZE]; char *ret_buf; int ret; @@ -115,8 +116,8 @@ char *tcmu_get_wwn(struct tcmu_device *dev) long long tcmu_get_device_size(struct tcmu_device *dev) { int fd; - char path[256]; - char buf[4096]; + char path[PATH_MAX]; + char buf[CFGFS_BUF_SIZE]; ssize_t ret; char *rover; unsigned long long size;
hv: debug: add CR4 to vcpu_dumpreg output CR4 valuse was missing in the output. Acked-by: Eddie Dong
@@ -716,9 +716,11 @@ int shell_vcpu_dumpreg(struct shell *p_shell, "RFLAGS=0x%016llx\r\n", cur_context->rip, cur_context->guest_cpu_regs.regs.rsp, cur_context->rflags); shell_puts(p_shell, temp_str); - snprintf(temp_str, MAX_STR_SIZE, "= CR0=0x%016llx CR2=0x%016llx " - " CR3=0x%016llx\r\n", cur_context->cr0, - cur_context->cr2, cur_context->cr3); + snprintf(temp_str, MAX_STR_SIZE, "= CR0=0x%016llx CR2=0x%016llx\r\n", + cur_context->cr0, cur_context->cr2); + shell_puts(p_shell, temp_str); + snprintf(temp_str, MAX_STR_SIZE, "= CR3=0x%016llx CR4=0x%016llx\r\n", + cur_context->cr3, cur_context->cr4); shell_puts(p_shell, temp_str); snprintf(temp_str, MAX_STR_SIZE, "= RAX=0x%016llx RBX=0x%016llx " "RCX=0x%016llx\r\n",
More efficient use of memcache
@@ -82,7 +82,10 @@ static struct mem_s* search(const void* ptr, bool remove) static bool free_check_p(const struct mem_s* rptr, size_t size, int dev, int tid) { - return (rptr->free && (rptr->device_id == dev) && (rptr->len >= size) + return (rptr->free + && (rptr->device_id == dev) + && (rptr->len >= size) + && (( 0 == size) || (rptr->len <= 4 * size)) // small allocations shall not occupy large memory areas (turned of if requested size is 0) && ((-1 == tid) || (rptr->thread_id == tid))); }
expermintal: put blackbox data onto d16 telemetry
#include "blackbox.h" +#include <string.h> + +#include "rx_frsky.h" #include "usb_configurator.h" uint32_t blackbox_rate = 2; @@ -129,5 +132,15 @@ void blackbox_update() { quic_blackbox(&state); } + if ((loop_counter % (uint32_t)((1000000.0f / LOOPTIME)) == 0)) { + smart_port_payload_t payload = { + .frame_id = FSSP_DATA_FRAME, + .value_id = 0x0830, + .value = 0x1337, + }; + + frsky_d16_write_telemetry(&payload); + } + loop_counter++; } \ No newline at end of file
Yet one more change to ctx.c on OSX
@@ -138,10 +138,8 @@ struct dill_ctx *dill_ctx_init(void) { dill_assert(rc == 0); if(dill_ismain()) { dill_main = &dill_ctx_; -#if !defined __APPLE__ rc = atexit(dill_ctx_atexit); dill_assert(rc == 0); -#endif } rc = pthread_setspecific(dill_key, &dill_ctx_); dill_assert(rc == 0); @@ -187,10 +185,8 @@ struct dill_ctx *dill_getctx_(void) { dill_ctx_init_(ctx); if(dill_ismain()) { dill_main = ctx; -#if !defined __APPLE__ rc = atexit(dill_ctx_atexit); dill_assert(rc == 0); -#endif } rc = pthread_setspecific(dill_key, ctx); dill_assert(rc == 0);
tests: improve the robustness of process cleanup on INT/TERM signals Type: improvement
rv=0 +# Minimalist version of cleanup, used for signal handling. +# Sends a SIGKILL to the entire process group, including ourselves. +# Needs just two external commands, making it more +# robust in case of resource issues. +panic() { + echo "$0(pid $$): Caught a signal, emergency clean-up" + # use "pgid:1=" output format to get unpadded process group ID + group_id=`ps -p $$ -o pgid:1=` + echo "$0(pid $$): sending kill to process group ID:${group_id}" + kill -9 -- -${group_id} + # not reached +} + +# Happy camper leisurely clean up - send the signal only to other +# processes in the process group, and also check +# that the processes exists before sending the signal. atexit() { group_id=`ps -p $$ -o pgid=` my_id=$$ @@ -17,7 +33,7 @@ atexit() { exit ${rv} } -trap "atexit;" SIGINT SIGTERM +trap "panic;" SIGINT SIGTERM FORCE_FOREGROUND=$1 shift
Fix logical condition.
#ifdef __FreeBSD__ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: head/sys/netinet/sctputil.c 360885 2020-05-10 22:54:30Z tuexen $"); +__FBSDID("$FreeBSD: head/sys/netinet/sctputil.c 361214 2020-05-18 15:02:15Z tuexen $"); #endif #include <netinet/sctp_os.h> @@ -3044,7 +3044,7 @@ sctp_calculate_rto(struct sctp_tcb *stcb, (void)SCTP_GETTIME_TIMEVAL(&now); } if ((old->tv_sec > now.tv_sec) || - ((old->tv_sec == now.tv_sec) && (old->tv_sec > now.tv_sec))) { + ((old->tv_sec == now.tv_sec) && (old->tv_usec > now.tv_usec))) { /* The starting point is in the future. */ return (0); }
OcBootManagementLib: Add AppleSecureBoot support on EFI files
#include <Library/OcDebugLogLib.h> #include <Library/DevicePathLib.h> #include <Library/MemoryAllocationLib.h> +#include <Library/OcAppleSecureBootLib.h> #include <Library/OcBootManagementLib.h> #include <Library/OcDevicePathLib.h> #include <Library/OcFileLib.h> @@ -159,6 +160,7 @@ InternalEfiLoadImage ( OUT EFI_HANDLE *ImageHandle ) { + EFI_STATUS SecureBootStatus; EFI_STATUS Status; VOID *AllocatedBuffer; UINT32 RealSize; @@ -196,6 +198,27 @@ InternalEfiLoadImage ( } } + if (DevicePath != NULL && SourceBuffer != NULL) { + SecureBootStatus = OcAppleSecureBootVerify ( + DevicePath, + SourceBuffer, + SourceSize + ); + } else { + SecureBootStatus = EFI_UNSUPPORTED; + } + + // + // A security violation means we should just die. + // + if (SecureBootStatus == EFI_SECURITY_VIOLATION) { + DEBUG (( + DEBUG_WARN, + "OCB: Apple Secure Boot prohibits this boot entry, enforcing!\n" + )); + return EFI_SECURITY_VIOLATION; + } + if (SourceBuffer != NULL) { RealSize = (UINT32) SourceSize; #ifdef MDE_CPU_IA32 @@ -211,6 +234,12 @@ InternalEfiLoadImage ( } } + if (SecureBootStatus == EFI_SUCCESS) { + // + // TODO: Here we should use a custom COFF loader! + // + } + Status = mOriginalEfiLoadImage ( BootPolicy, ParentImageHandle,
fix(docs): Clear up ambiguity on supported hardware page
@@ -70,7 +70,7 @@ function mapInterconnect({ return ( <div key={interconnect.id}> - <h4>{interconnect.name} Keyboards</h4> + <h4>{interconnect.name} Interconnect</h4> {interconnect.description && <p>{interconnect.description}</p>} <h5>Boards</h5> <ul> @@ -148,7 +148,7 @@ function HardwareList({ items }: HardwareListProps) { return ( <> <h2>Keyboards</h2> - <h3>Onboard Controller Boards</h3> + <h3>Onboard Controller Keyboards</h3> <p> Keyboards with onboard controllers are single PCBs that contain all the components of a keyboard, including the controller chip, switch @@ -161,12 +161,13 @@ function HardwareList({ items }: HardwareListProps) { <HardwareLineItem key={s.id} item={s} /> ))} </ul> - <h3>Composite Boards</h3> + <h3>Composite Keyboards</h3> <p> Composite keyboards are composed of two main PCBs: a small controller board with exposed pads, and a larger keyboard PCB (a shield, in ZMK - lingo) with switch footprints and location a where the controller is - added. + lingo) with switch footprints and a location where the controller is + added. This location is called an interconnect. Multiple interconnects + can be found below. </p> {Object.values(grouped.interconnects).map(mapInterconnect)} </>
pbio/main: reduce fast loop time If we aim for 6, we are at least on average below 10 on the ev3dev port. For the other platforms it was originally 2 not long ago, so 6 should not hurt.
@@ -84,7 +84,7 @@ int pbio_do_one_event(void) { // pbio_do_one_event() can be called quite frequently (e.g. in a tight loop) so we // don't want to call all of the subroutines unless enough time has // actually elapsed to do something useful. - if (now - prev_fast_poll_time >= 10) { + if (now - prev_fast_poll_time >= 6) { _pbio_servo_poll(); _pbio_drivebase_poll(); prev_fast_poll_time = now;
Improve Luos_engine build script display
import sys import subprocess -from os import system, listdir +from os import system, listdir, path from os.path import join, realpath Import('env') # install pyluos try: - from pyluos import version - print("\nPyluos revision " + str(version.version) + " already installed.") + import pyluos subprocess.check_call([sys.executable, "-m", "pip", "install", "pyluos", "--upgrade", "--quiet"]) except ImportError: # module doesn't exist, deal with it. subprocess.check_call([sys.executable, "-m", "pip", "install", "pyluos"]) pass +print('\n\033[4mLuos engine build configuration:\033[0m\n') +try: + from pyluos import version + print("\t*\033[0;32m Pyluos revision " + + str(version.version) + " ready.\033[0m") +except ImportError: # module doesn't exist, deal with it. + print("\t*\033[0;32m Pyluos install failed. Platformio will be unable to use bootloader flash feature.\033[0m") sources = ["+<*.c>", "+<../../../Network/Robus/src/*.c>", @@ -24,9 +30,15 @@ sources = ["+<*.c>", "+<../../Bootloader/*.c>"] # private library flags +find_HAL = False for item in env.get("CPPDEFINES", []): if isinstance(item, tuple) and item[0] == "LUOSHAL": - print("\nSelected HAL for Luos and Robus is : %s\n" % item[1]) + find_HAL = True + if (path.exists("Network/Robus/HAL/" + item[1]) and path.exists("Engine/HAL/" + item[1])): + print( + "\t*\033[0;32m %s HAL selected for Luos and Robus.\033[0m\n" % item[1]) + else: + print("\t*\033[1;31m %s HAL not found\033[0m\n" % item[1]) env.Append(CPPPATH=[realpath("Network/Robus/HAL/" + item[1])]) env.Append(CPPPATH=[realpath("Engine/HAL/" + item[1])]) env.Replace(SRC_FILTER=sources) @@ -35,6 +47,9 @@ for item in env.get("CPPDEFINES", []): env.Append(SRC_FILTER=["+<../../HAL/%s/*.c>" % item[1]]) break +if (find_HAL == False): + print("\033[1;31mNo HAL selected. Please add a \033[0;30;47m-DLUOSHAL\033[0m\033[1;31m compilation flag\033[0m\n") + # native unit testing if (env.get("PIOPLATFORM") == "native"): for item in env.get("CPPDEFINES", []):
improve metainfo handling
@@ -102,6 +102,35 @@ function patch_sourcebatch(target, sourcebatch) end end +function parse_meta_info(target, metafile) + local metadata = json.loadfile(metafile) + if metadata._VENDOR_extension.xmake then + return metadata._VENDOR_extension.xmake.file, metadata._VENDOR_extension.xmake.name, metadata + end + + local file = path.basename(metafile) + for _, ext in pairs({".mpp", ".mxx", ".cppm", ".ixx"}) do + if os.exists(path.join(path.directory(metafile), file .. ext)) then + file = file .. ext + break + end + end + + local sourcecode = io.readfile(path.join(path.directory(metafile), file)) + sourcecode = sourcecode:gsub("//.-\n", "\n") + sourcecode = sourcecode:gsub("/%*.-%*/", "") + + local name + for _, line in ipairs(sourcecode:split("\n", {plain = true})) do + name = line:match("export%s+module%s+(.+)%s*;") or line:match("export%s+__preprocessed_module%s+(.+)%s*;") + if name then + break + end + end + + return file, name, metadata +end + -- extract packages modules dependencies function get_all_package_modules(target, modules, opt) local package_modules @@ -110,11 +139,11 @@ function get_all_package_modules(target, modules, opt) for name, package in pairs(target:pkgs()) do package_modules = package_modules or {} local modules_dir = path.join(package:installdir(), "modules", name) - local meta_files = os.files(path.join(modules_dir, "**.meta-info")) - for _, file in ipairs(meta_files) do - local metadata = json.loadfile(file) - package_modules[metadata._VENDOR_extension.name] = { - file = path.join(modules_dir, metadata._VENDOR_extension.file), + local metafiles = os.files(path.join(modules_dir, "**.meta-info")) + for _, metafile in ipairs(metafiles) do + local modulefile, name, metadata = parse_meta_info(target, metafile) + package_modules[name] = { + file = path.join(modules_dir, modulefile), metadata = metadata } end @@ -662,7 +691,7 @@ function generate_meta_module_info(target, name, sourcefile, requires) end end - module_metadata._VENDOR_extension = {name = name, file = path.filename(sourcefile)} + module_metadata._VENDOR_extension = { xmake = { name = name, file = path.filename(sourcefile) }} return module_metadata end
override with newer config.sub for aarch64
@@ -108,6 +108,7 @@ export TAUROOT=`pwd` # override with newer config.guess for aarch64 %ifarch aarch64 cp /usr/lib/rpm/config.guess utils/opari2/build-config/. +cp /usr/lib/rpm/config.sub utils/opari2/build-config/. %endif # Try and figure out architecture
Do not process finger events if no control If --no-control is passed, then im->mp is NULL, so processing touches would crash.
@@ -899,6 +899,9 @@ sc_input_manager_handle_event(struct sc_input_manager *im, SDL_Event *event) { case SDL_FINGERMOTION: case SDL_FINGERDOWN: case SDL_FINGERUP: + if (!im->control) { + break; + } sc_input_manager_process_touch(im, &event->tfinger); break; case SDL_DROPFILE: {
Fix cross compilation of C# DLL.
@@ -827,7 +827,7 @@ if(${TINYSPLINE_BINDING_REQUESTED}) SWIG_ARGS -namespace TinySpline ) # DLL - if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows") if(TINYSPLINE_CSHARP_FRAMEWORK_VERSION STREQUAL "") set(TINYSPLINE_CSHARP_FRAMEWORK_VERSION "3.5" CACHE STRING "Autodetected."
build: replace TEST_ with TEST enum
@@ -67,10 +67,10 @@ CMAKE_FLAGS_DEBUG = ['ENABLE_DEBUG': 'ON'] CMAKE_FLAGS_LOGGER = ['ENABLE_LOGGER': 'ON'] // Define Test Flag globals -TEST_MEM = 'mem' -TEST_NOKDB = 'nokdb' -TEST_ALL = 'all' -TEST_INSTALL = 'install' +enum TEST { + MEM, NOKDB, ALL, INSTALL + public TEST() {} // WORKAROUND https://issues.jenkins-ci.org/browse/JENKINS-33023 +} NOW = new Date() DOCKER_IMAGES = [:] @@ -270,7 +270,7 @@ def generateMainBuildStages() { DOCKER_IMAGES.stretch, CMAKE_FLAGS_BUILD_ALL + CMAKE_FLAGS_COVERAGE, - [TEST_ALL, TEST_MEM, TEST_INSTALL] + [TEST.ALL, TEST.MEM, TEST.INSTALL] ) tasks << buildIcheck() tasks << buildCheckReleaseNotes() @@ -298,32 +298,32 @@ def generateFullBuildStages() { "debian-oldstable-full", DOCKER_IMAGES.jessie, CMAKE_FLAGS_BUILD_ALL, - [TEST_ALL, TEST_MEM, TEST_INSTALL] + [TEST.ALL, TEST.MEM, TEST.INSTALL] ) tasks << buildAndTest( "debian-unstable-full", DOCKER_IMAGES.sid, CMAKE_FLAGS_BUILD_ALL, - [TEST_ALL, TEST_MEM, TEST_INSTALL] + [TEST.ALL, TEST.MEM, TEST.INSTALL] ) tasks << buildAndTest( "debian-unstable-full-clang", DOCKER_IMAGES.sid, CMAKE_FLAGS_BUILD_ALL + CMAKE_FLAGS_CLANG, - [TEST_ALL, TEST_MEM, TEST_INSTALL] + [TEST.ALL, TEST.MEM, TEST.INSTALL] ) tasks << buildAndTest( "ubuntu-xenial", DOCKER_IMAGES.xenial, CMAKE_FLAGS_BUILD_ALL, - [TEST_ALL] + [TEST.ALL] ) tasks << buildAndTest( "debian-stable-minimal", DOCKER_IMAGES.stretch_minimal, [:], - [TEST_ALL] + [TEST.ALL] ) return tasks } @@ -483,10 +483,10 @@ def buildAndTest(test_name, image, extra_cmake_flags = [:], } def test_coverage = cmake_flags.intersect(CMAKE_FLAGS_COVERAGE) .equals(CMAKE_FLAGS_COVERAGE) - def test_mem = tests.contains(TEST_MEM) - def test_nokdb = tests.contains(TEST_NOKDB) - def test_all = tests.contains(TEST_ALL) - def install = tests.contains(TEST_INSTALL) + def test_mem = tests.contains(TEST.MEM) + def test_nokdb = tests.contains(TEST.NOKDB) + def test_all = tests.contains(TEST.ALL) + def install = tests.contains(TEST.INSTALL) return [(test_name): { stage(test_name) { withDockerEnv(image) {
Fix compilation issue in bps
@@ -219,7 +219,7 @@ static int print_one_prog(uint32_t prog_id) nr_map_ids = min(prog_info.nr_map_ids, nr_map_ids); for (i = 0; i < nr_map_ids; i++) { struct bpf_map_info map_info = {}; - uint32_t info_len = sizeof(map_info); + info_len = sizeof(map_info); int map_fd; map_fd = bpf_map_get_fd_by_id(map_ids[i]);
imgmgr; erase was returning error even if successful.
@@ -328,10 +328,6 @@ imgr_erase(struct mgmt_cbuf *cb) return MGMT_ERR_ENOMEM; } - if (!imgr_state.upload.fa) { - return MGMT_ERR_EINVAL; - } - g_err |= cbor_encode_text_stringz(&cb->encoder, "rc"); g_err |= cbor_encode_int(&cb->encoder, MGMT_ERR_EOK);

This is a filtered version of the JetBrains-Research/commit-chronicle dataset. It has been subsetted for the following languages:

[
  "C", "C++", "Go", "Java", "Python", "Rust", "TypeScript"
]

Further filtering steps undertaken are:

  1. Useless features have been removed and only the message and diff retained.
  2. Only commits that modify a single file have been chosen.
  3. Samples containing diffs longer than 1024 tokens (by the OBF/obf-tokenizer tokenizer estimate) have been discarded.
Downloads last month
254
Edit dataset card