message
stringlengths
6
474
diff
stringlengths
8
5.22k
use new oidc-add --loaded option
@@ -142,10 +142,10 @@ fi cat $INITSCRIPT # Add given accounts if they're not already loaded. +LOADED="`oidc-add --loaded 2>/dev/null`" +LOADED=" `echo $LOADED` " for ACCOUNT; do - # Would prefer an option to oidc-agent or oidc-add to find out if an - # account is loaded, but for now find out by trying to get a token. - if oidc-token $ACCOUNT 2>&1|grep -q Error:; then + if [[ "$LOADED" != *" $ACCOUNT "* ]]; then # Account not already loaded, so add it. # Send all messages to stderr and also pipe to grep to look for error if oidc-add $ACCOUNT 2>&1|tee /dev/fd/2|grep -q Error:; then
Fix iotivity-lite-jni project build Missed renaming IoTivity-Constrained to IoTivity-lite when the rename was merged in from master branch to swig branch.
<Link> <SubSystem>Windows</SubSystem> <GenerateDebugInformation>true</GenerateDebugInformation> - <AdditionalDependencies>ws2_32.lib;Iphlpapi.lib;IoTivity-Constrained.lib</AdditionalDependencies> + <AdditionalDependencies>ws2_32.lib;Iphlpapi.lib;IoTivity-lite.lib</AdditionalDependencies> <AdditionalLibraryDirectories>$(SolutionDir)\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> </Link> <PreBuildEvent> @@ -149,7 +149,7 @@ del $(SolutionDir)..\..\..\swig\iotivity-lite-java\src\org\iotivity\oc\*.java</C <Link> <SubSystem>Windows</SubSystem> <GenerateDebugInformation>true</GenerateDebugInformation> - <AdditionalDependencies>ws2_32.lib;Iphlpapi.lib;IoTivity-Constrained.lib</AdditionalDependencies> + <AdditionalDependencies>ws2_32.lib;Iphlpapi.lib;IoTivity-lite.lib</AdditionalDependencies> <AdditionalLibraryDirectories>$(SolutionDir)\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> </Link> <PreBuildEvent> @@ -189,7 +189,7 @@ del $(SolutionDir)..\..\..\swig\iotivity-lite-java\src\org\iotivity\oc\*.java</C <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> <GenerateDebugInformation>true</GenerateDebugInformation> - <AdditionalDependencies>ws2_32.lib;Iphlpapi.lib;IoTivity-Constrained.lib</AdditionalDependencies> + <AdditionalDependencies>ws2_32.lib;Iphlpapi.lib;IoTivity-lite.lib</AdditionalDependencies> <AdditionalLibraryDirectories>$(SolutionDir)\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> </Link> <PreBuildEvent> @@ -228,7 +228,7 @@ del $(SolutionDir)..\..\..\swig\iotivity-lite-java\src\org\iotivity\oc\*.java</C <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> <GenerateDebugInformation>true</GenerateDebugInformation> - <AdditionalDependencies>ws2_32.lib;Iphlpapi.lib;IoTivity-Constrained.lib</AdditionalDependencies> + <AdditionalDependencies>ws2_32.lib;Iphlpapi.lib;IoTivity-lite.lib</AdditionalDependencies> <AdditionalLibraryDirectories>$(SolutionDir)\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> </Link> <PreBuildEvent> @@ -253,7 +253,7 @@ del $(SolutionDir)..\..\..\swig\iotivity-lite-java\src\org\iotivity\oc\*.java</C <Text Include="ReadMe.txt" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\IoTivity-Constrained.vcxproj"> + <ProjectReference Include="..\IoTivity-lite.vcxproj"> <Project>{1866d7a4-fc11-46ca-9377-3baa69d4bf58}</Project> </ProjectReference> </ItemGroup>
Check for definition of NT_FILE Conditionally check for NT_FILE note coredump handling.
@@ -67,6 +67,7 @@ static int _handle_file_note(uint32_t n_namesz, uint32_t n_descsz, uint32_t n_type, char *name, uint8_t *desc, void *arg) { struct UCD_info *ui = (struct UCD_info *)arg; +#ifdef NT_FILE if (n_type == NT_FILE) { Debug(0, "found a PT_FILE note\n"); @@ -96,6 +97,7 @@ _handle_file_note(uint32_t n_namesz, uint32_t n_descsz, uint32_t n_type, char *n strings += (len + 1); } } +#endif return UNW_ESUCCESS; }
Add referenced_message loading to channel:message::json_load
@@ -140,6 +140,8 @@ json_load(char *str, size_t len, void *p_message) message->nonce = NULL; } + message->referenced_message = init(); + json_scanf(str, len, "[id]%F" "[channel_id]%F" @@ -156,8 +158,8 @@ json_load(char *str, size_t len, void *p_message) "[pinned]%b" "[webhook_id]%F" "[type]%d" - "[flags]%d", - //"[referenced_message]%F", + "[flags]%d" + "[referenced_message]%F", &orka_strtoull, &message->id, &orka_strtoull, &message->channel_id, &orka_strtoull, &message->guild_id, @@ -172,7 +174,14 @@ json_load(char *str, size_t len, void *p_message) &message->pinned, &orka_strtoull, &message->webhook_id, &message->type, - &message->flags); + &message->flags, + &json_load, message->referenced_message); + + if(!message->referenced_message->id) + { + cleanup(message->referenced_message); + message->referenced_message = NULL; + } D_NOTOP_PUTS("Message object loaded with API response"); } @@ -195,8 +204,8 @@ json_list_load(char *str, size_t len, void *p_messages) *(dati ***)p_messages = new_messages; } -static dati* -message_init() +dati* +init() { dati *new_message = (dati*)calloc(1, sizeof(dati)); if (NULL == new_message) return NULL; @@ -217,21 +226,6 @@ cleanupA: return NULL; } -dati* -init() -{ - dati *new_message = message_init(); - if (NULL == new_message) return NULL; - - new_message->referenced_message = message_init(); - if (NULL == new_message->referenced_message) { - cleanup(new_message); - return NULL; - } - - return new_message; -} - static void message_cleanup(dati *message) {
usb.c: indent, make error use ELOG, and add trace
@@ -1130,9 +1130,9 @@ static size_t stlink_probe_usb_devs(libusb_device **devs, stlink_t **sldevs[]) { ret = libusb_open(dev, &handle); if (ret < 0) { if (ret == LIBUSB_ERROR_ACCESS) { - WLOG("failed to open USB device (LIBUSB_ERROR_ACCESS), try running as root?\n"); + ELOG("Could not open USB device %#06x:%#06x, access error.\n", desc.idVendor, desc.idProduct, ret); } else { - WLOG("failed to open USB device (libusb error: %d)\n", ret); + ELOG("Failed to open USB device %#06x:%#06x, libusb error: %d)\n", desc.idVendor, desc.idProduct, ret); } break; } @@ -1146,8 +1146,10 @@ static size_t stlink_probe_usb_devs(libusb_device **devs, stlink_t **sldevs[]) { } stlink_t *sl = stlink_open_usb(0, 1, serial); - if (!sl) + if (!sl) { + ELOG("Failed to open USB device %#06x:%#06x\n", desc.idVendor, desc.idProduct); continue; + } _sldevs[slcur++] = sl; }
sandbox/fskcorr: adding power spectral density estimate
@@ -27,7 +27,7 @@ int main(int argc, char*argv[]) unsigned int j; // derived values - float nstd = 0; + float nstd = 1.0f; float gain = 1.0f; unsigned int i1 = (unsigned int)round(fc*M); unsigned int i0 = M - (i1 - 1); @@ -69,6 +69,10 @@ int main(int argc, char*argv[]) for (i=0; i<M; i++) windowcf_push(buf_rx, nstd*(randnf() + _Complex_I*randnf())*M_SQRT1_2); + // create spectral periodogram + unsigned int nfft = 2400; + spgramcf periodogram = spgramcf_create_default(nfft); + // FILE * fid = fopen("fskcorr_test.m","w"); fprintf(fid,"clear all;\n"); @@ -86,12 +90,17 @@ int main(int argc, char*argv[]) memset(buf_0, 0x0, M*sizeof(float complex)); if (i < n) buf_0[ seq[i] ? i1 : i0 ] = gain; + else + buf_0[ rand() & 1 ? i1 : i0 ] = gain; fft_execute(ifft); // buf_0 -> buf_1 // add noise for (j=0; j<M; j++) buf_1[j] += nstd*(randnf() + _Complex_I*randnf())*M_SQRT1_2; + // update spectral periodogram + spgramcf_write(periodogram, buf_1, M); + // execute... for (j=0; j<M; j++) { if (!timer) { @@ -126,13 +135,27 @@ int main(int argc, char*argv[]) for (i=0; i<n*p; i++) { fprintf(fid,"buf_mf(%4u) = %12.4e;\n", i+1, buf_mf[i]); } + // compute power spectral density output + float psd[nfft]; + spgramcf_get_psd(periodogram, psd); + for (i=0; i<nfft; i++) { + fprintf(fid,"psd(%4u) = %12.4e;\n", i+1, psd[i]); + } fprintf(fid,"num_samples = length(llr);\n"); fprintf(fid,"txy = [0:(num_samples-1)] - p*n + 1;\n"); fprintf(fid,"S = fft(s, num_samples);\n"); fprintf(fid,"L = fft(llr,num_samples);\n"); + fprintf(fid,"figure('position',[1 1 800 800]);\n"); + fprintf(fid,"subplot(2,1,1);\n"); fprintf(fid," plot(txy,rxy,'-x');\n"); fprintf(fid," axis([-200 200 -0.2 1.2]);\n"); fprintf(fid," grid on;\n"); + fprintf(fid,"subplot(2,1,2);\n"); + fprintf(fid," nfft=length(psd);\n"); + fprintf(fid," f = [0:(nfft-1)]/nfft - 0.5;\n"); + fprintf(fid," plot(f,psd);\n"); + fprintf(fid," axis([-0.5 0.5 -10 40]);\n"); + fprintf(fid," grid on;\n"); fclose(fid); printf("results written to fskcorr_test.m\n"); @@ -145,6 +168,7 @@ int main(int argc, char*argv[]) windowcf_destroy(buf_rx); dotprod_rrrf_destroy(xcorr); windowf_destroy(buf_xcorr); + spgramcf_destroy(periodogram); printf("done.\n"); return 0;
sys/shell: print info when no help available
@@ -193,16 +193,17 @@ show_cmd_help(char *argv[]) console_printf("%s:\n", shell_module->commands[i].sc_cmd); if (!shell_module->commands[i].help) { - console_printf("\n"); + console_printf("(no help available)\n"); return 0; } if (shell_module->commands[i].help->usage) { + console_printf("%s:\n", shell_module->commands[i].sc_cmd); console_printf("%s\n", shell_module->commands[i].help->usage); } else if (shell_module->commands[i].help->summary) { - console_printf("%s\n", - shell_module->commands[i].help->summary); + console_printf("%s:\n", shell_module->commands[i].sc_cmd); + console_printf("%s\n", shell_module->commands[i].help->summary); } else { - console_printf("\n"); + console_printf("(no help available)\n"); } return 0;
[mechanics] typo in CMakeLists.txt
@@ -118,7 +118,7 @@ if(SICONOS_HAS_BULLET) # Update compile flags for component if(BULLET_USE_DOUBLE_PRECISION) # Do we need this as public or private? Check if mechanics io needs this option? - target_compile_options(${COMPONENTS} PUBLIC "-DBT_USE_DOUBLE_PRECISION") + target_compile_options(${COMPONENT} PUBLIC "-DBT_USE_DOUBLE_PRECISION") endif() endif()
Fix elog info of ExecModifyTable function is not suitable issue. This patch addresses NFC.
@@ -2517,7 +2517,7 @@ ExecModifyTable(PlanState *pstate) &isNull); /* shouldn't ever get a null result... */ if (isNull) - elog(ERROR, "action is NULL"); + elog(ERROR, "gp_segment_id is NULL"); segid = DatumGetInt32(datum); } @@ -2528,7 +2528,7 @@ ExecModifyTable(PlanState *pstate) &isNull); /* shouldn't ever get a null result... */ if (isNull) - elog(ERROR, "gp_segment_id is NULL"); + elog(ERROR, "action is NULL"); action = DatumGetInt32(datum); }
wireless: Add ioctl cmd to setting PTA prio info: Is the PTA priority enumeration type sufficient?
#define SIOCSIWCOUNTRY _WLIOC(0x0037) /* Set country code */ #define SIOCGIWCOUNTRY _WLIOC(0x0038) /* Get country code */ +/* WIFI / BT coexist type */ + +#define SIOCSIWPTAPRIO _WLIOC(0x0039) /* Set PTA priority type */ +#define SIOCGIWPTAPRIO _WLIOC(0x003a) /* Get PTA priority type */ + #define WL_IS80211POINTERCMD(cmd) ((cmd) == SIOCGIWSCAN || \ (cmd) == SIOCSIWSCAN || \ (cmd) == SIOCSIWCOUNTRY || \ /* Device-specific network IOCTL commands *******************************************/ #define WL_NETFIRST 0x0000 /* First network command */ -#define WL_NNETCMDS 0x0039 /* Number of network commands */ +#define WL_NNETCMDS 0x003b /* Number of network commands */ /* Reserved for Bluetooth network devices (see bt_ioctls.h) */ #define IW_ENCODE_ALG_PMK 4 #define IW_ENCODE_ALG_AES_CMAC 5 +/* IW_COEX_PTA_PRIORITY values */ + +#define IW_PTA_PRIORITY_COEX_MAXIMIZED 0 +#define IW_PTA_PRIORITY_COEX_HIGH 1 +#define IW_PTA_PRIORITY_BALANCED 2 +#define IW_PTA_PRIORITY_WLAN_HIGH 3 +#define IW_PTA_PRIORITY_WLAN_MAXIMIZED 4 + /************************************************************************************ * Public Types ************************************************************************************/
pyapi BUGFIX double free The data managed by libyang python API were freed directly by libnetconf's python binding code.
@@ -269,7 +269,8 @@ ncRPCEditConfig(ncSessionObject *self, PyObject *args, PyObject *keywords) node = lyd_new_leaf(data, ietfnc, "url", content_str); } } else if (content_tree) { - node = lyd_new_anydata(data, ietfnc, "config", content_tree, LYD_ANYDATA_DATATREE); + /* the content_tree is managed by libyang, make copy to insert it into RPC and manage it on our own */ + node = lyd_new_anydata(data, ietfnc, "config", lyd_dup_withsiblings(content_tree, LYD_DUP_OPT_RECURSIVE), LYD_ANYDATA_DATATREE); } if (!node) { goto error;
Use SNI on outgoing TLS connections When establishing an outgoing TLS connection using a hostname as a target, use TLS SNI extensions to include the hostname in use.
#include <openssl/decoder.h> #endif #include <sys/uio.h> +#include <arpa/inet.h> #define REDIS_TLS_PROTO_TLSv1 (1<<0) #define REDIS_TLS_PROTO_TLSv1_1 (1<<1) @@ -857,10 +858,16 @@ static int connTLSAccept(connection *_conn, ConnectionCallbackFunc accept_handle static int connTLSConnect(connection *conn_, const char *addr, int port, const char *src_addr, ConnectionCallbackFunc connect_handler) { tls_connection *conn = (tls_connection *) conn_; + unsigned char addr_buf[sizeof(struct in6_addr)]; if (conn->c.state != CONN_STATE_NONE) return C_ERR; ERR_clear_error(); + /* Check whether addr is an IP address, if not, use the value for Server Name Indication */ + if (inet_pton(AF_INET, addr, addr_buf) != 1 && inet_pton(AF_INET6, addr, addr_buf) != 1) { + SSL_set_tlsext_host_name(conn->ssl, addr); + } + /* Initiate Socket connection first */ if (connectionTypeTcp()->connect(conn_, addr, port, src_addr, connect_handler) == C_ERR) return C_ERR;
u3: fixes road leap/fall debug printfs
@@ -744,9 +744,9 @@ u3m_leap(c3_w pad_w) rod_u = _pave_south(u3a_into(bot_p), c3_wiseof(u3a_road), len_w); #if 0 - u3l_log("leap: from north %p (cap %x), to south %p\r\n", + fprintf(stderr, "leap: from north %p (cap 0x%x), to south %p\r\n", u3R, - u3R->cap_p + len_p, + u3R->cap_p + len_w, rod_u); #endif } @@ -756,9 +756,9 @@ u3m_leap(c3_w pad_w) rod_u = _pave_north(u3a_into(bot_p), c3_wiseof(u3a_road), len_w); #if 0 - u3l_log("leap: from north %p (cap %p), to south %p\r\n", + fprintf(stderr, "leap: from south %p (cap 0x%x), to north %p\r\n", u3R, - u3R->cap_p - len_p, + u3R->cap_p - len_w, rod_u); #endif } @@ -791,13 +791,13 @@ u3m_fall() c3_assert(0 != u3R->par_p); #if 0 - u3l_log("fall: from %s %p, to %s %p (cap %p, was %p)\r\n", + fprintf(stderr, "fall: from %s %p, to %s %p (cap 0x%x, was 0x%x)\r\n", _(u3a_is_north(u3R)) ? "north" : "south", u3R, - _(u3a_is_north(u3R)) ? "north" : "south", + _(u3a_is_north(u3to(u3_road, u3R->par_p))) ? "north" : "south", u3to(u3_road, u3R->par_p), - u3R->hat_w, - u3R->rut_w); + u3R->hat_p, + u3R->rut_p); #endif u3to(u3_road, u3R->par_p)->pro.nox_d += u3R->pro.nox_d;
Added details on round-robin thread switching
@@ -727,9 +727,13 @@ several threads. Threads are not really executed concurrently, but are timed whe into time slices and RTX5 assigns a time slice to each thread. Because the time slice is typically short (only a few milliseconds), it appears as though threads execute simultaneously. -Threads execute for the duration of their time slice (unless the thread's time slice is given up). Then, RTX switches to the -next thread that is in \b READY state and has the same priority. If no other task with the same priority is ready to run, the -current running task resumes it execution. +Round-robin thread switching functions as follows: +- the tick is preloaded with the timeout value when a thread switch occurs +- the tick is decremented (if not already zero) each system tick if the same thread is still executing +- when the tick reaches 0 it indicates that a timeout has occurred. If there is another thread ready with same priority, then the system switches to that thread and the tick is preloaded with timeout again. + +In other word, threads execute for the duration of their time slice (unless the thread's time slice is given up). Then, RTX switches to the next thread that is in \b READY state and has the same priority. If no other thread with the same priority is ready to run, the +current running thread resumes it execution. \subsection systemConfig_isr_fifo ISR FIFO Queue The RTX functions (\ref CMSIS_RTOS_ISR_Calls), when called from and interrupt handler, store the request type and optional
mmapstorage: check file size when mapping, munmap on error
@@ -934,6 +934,7 @@ int elektraMmapstorageGet (Plugin * handle ELEKTRA_UNUSED, KeySet * returned, Ke } FILE * fp; + char * mappedRegion = MAP_FAILED; if ((fp = openFile (parentKey, "r+")) == 0) { @@ -963,8 +964,14 @@ int elektraMmapstorageGet (Plugin * handle ELEKTRA_UNUSED, KeySet * returned, Ke goto error; } - char * mappedRegion = MAP_FAILED; - mappedRegion = mmapFile ((void *) 0, fp, sbuf.st_size, MAP_PRIVATE, parentKey); // TODO: save or unmap linked file on error + if (sbuf.st_size < 0 || (size_t) sbuf.st_size != mmapHeader.allocSize) + { + // config file size mismatch + ELEKTRA_LOG_WARNING ("mmap file size differs from metadata, file was altered"); + goto error; + } + + mappedRegion = mmapFile ((void *) 0, fp, sbuf.st_size, MAP_PRIVATE, parentKey); if (mappedRegion == MAP_FAILED) { @@ -1016,6 +1023,10 @@ error: ELEKTRA_SET_ERROR_GET (parentKey); } + if (mappedRegion != MAP_FAILED) + { + munmap (mappedRegion, sbuf.st_size); + } fclose (fp); keyDel (found); @@ -1039,6 +1050,7 @@ int elektraMmapstorageSet (Plugin * handle ELEKTRA_UNUSED, KeySet * returned, Ke } FILE * fp; + char * mappedRegion = MAP_FAILED; if ((fp = openFile (parentKey, "w+")) == 0) { @@ -1059,7 +1071,7 @@ int elektraMmapstorageSet (Plugin * handle ELEKTRA_UNUSED, KeySet * returned, Ke goto error; } - char * mappedRegion = mmapFile ((void *) 0, fp, mmapHeader.allocSize, MAP_SHARED, parentKey); + mappedRegion = mmapFile ((void *) 0, fp, mmapHeader.allocSize, MAP_SHARED, parentKey); ELEKTRA_LOG_DEBUG ("mappedRegion ptr: %p", (void *) mappedRegion); if (mappedRegion == MAP_FAILED) { @@ -1099,6 +1111,10 @@ error: ELEKTRA_SET_ERROR_SET (parentKey); } + if (mappedRegion != MAP_FAILED) + { + munmap (mappedRegion, mmapHeader.allocSize); + } fclose (fp); delDynArray (dynArray);
fix number/float checks
@@ -26,8 +26,8 @@ const INTEGER_TYPES = [ const FLOAT_TYPES = [ 'float', 'double' ] -const isNumber = (value) => !isNaN(parseFloat(value)) && isFinite(value) -const isInt = (value) => /(-|\+)?[0-9]+/.test(value) +const isNumber = (value) => !isNaN(value) +const isInt = (value) => /^(-|\+)?[0-9]+$/.test(value) const elektraEnumToJSON = (val) => { const convertedVal = val.replace(/'/g, '"')
picture_csp_enc.c,CheckNonOpaque: rm unneeded local the ternary used with alpha_offset was removed in: Import,RGBA: fix for BigEndian import use the ALPHA_OFFSET directly
@@ -69,9 +69,8 @@ static int CheckNonOpaque(const uint8_t* alpha, int width, int height, int WebPPictureHasTransparency(const WebPPicture* picture) { if (picture == NULL) return 0; if (picture->use_argb) { - const int alpha_offset = ALPHA_OFFSET; if (picture->argb != NULL) { - return CheckNonOpaque((const uint8_t*)picture->argb + alpha_offset, + return CheckNonOpaque((const uint8_t*)picture->argb + ALPHA_OFFSET, picture->width, picture->height, 4, picture->argb_stride * sizeof(*picture->argb)); }
add comment on wait strategy in region allocation
@@ -139,7 +139,13 @@ static bool mi_region_commit_blocks(mem_region_t* region, size_t idx, size_t bit start = ALLOCATING; // try to start allocating } else if (start == ALLOCATING) { - mi_atomic_yield(); // another thead is already allocating.. wait it out + // another thead is already allocating.. wait it out + // note: the wait here is not great (but should not happen often). Another + // strategy might be to just allocate another region in parallel. This tends + // to be bad for benchmarks though as these often start many threads at the + // same time leading to the allocation of too many regions. (Still, this might + // be the most performant and it's ok on 64-bit virtual memory with over-commit.) + mi_atomic_yield(); continue; } } while( start == ALLOCATING && !mi_atomic_compare_exchange_ptr(&region->start, ALLOCATING, NULL) );
Update Mutual Auth Unit Test to verify Handshake Type includes Client Auth
@@ -255,6 +255,8 @@ int main(int argc, char **argv) /* Verify that both connections are waiting for Application Data */ EXPECT_TRUE(APPLICATION_DATA == s2n_conn_get_current_message_type(client_conn)); EXPECT_TRUE(APPLICATION_DATA == s2n_conn_get_current_message_type(server_conn)); + EXPECT_TRUE(server_conn->handshake.handshake_type & CLIENT_AUTH); + EXPECT_TRUE(client_conn->handshake.handshake_type & CLIENT_AUTH); EXPECT_SUCCESS(s2n_connection_free(client_conn)); EXPECT_SUCCESS(s2n_connection_free(server_conn));
core: fix cache memleak
@@ -975,9 +975,9 @@ static int kdbCheckSplitState (Split * split, KeySet * global) elektraFree (name); name = 0; + keyDel (key); } - keyDel (key); return 0; error: @@ -1089,6 +1089,7 @@ static int kdbLoadSplitState (Split * split, KeySet * global) elektraFree (name); name = 0; + keyDel (key); }
10 tries, not 100
@@ -35,15 +35,17 @@ def _connect_wifi(dongle_id, pw): os.system("networksetup -setairportnetwork en0 %s %s" % (ssid, pw)) else: cnt = 0 - while 1: + MAX_TRIES = 10 + while cnt < MAX_TRIES: + print "WIFI: scanning %d" % cnt os.system("nmcli device wifi rescan") wifi_scan = filter(lambda x: ssid in x, subprocess.check_output(["nmcli","dev", "wifi", "list"]).split("\n")) if len(wifi_scan) != 0: break time.sleep(0.1) - # 100 tries, ~10 seconds max + # MAX_TRIES tries, ~10 seconds max cnt += 1 - assert cnt < 100 + assert cnt < MAX_TRIES os.system("nmcli d wifi connect %s password %s" % (ssid, pw)) # TODO: confirm that it's connected to the right panda
crypto: skip empty key IDs as recipients I discovered this bug during my work on . If an empty recipient is defined, GnuPG reports an error because it receives invalid command line arguments.
@@ -617,7 +617,7 @@ int ELEKTRA_PLUGIN_FUNCTION (gpgEncryptMasterPassword) (KeySet * conf, Key * err ksRewind (conf); while ((k = ksNext (conf)) != 0) { - if (keyIsBelow (k, root)) + if (keyIsBelow (k, root) && strlen (keyString (k)) > 0) { recipientCount++; } @@ -655,11 +655,12 @@ int ELEKTRA_PLUGIN_FUNCTION (gpgEncryptMasterPassword) (KeySet * conf, Key * err ksRewind (conf); while ((k = ksNext (conf)) != 0) { - if (keyIsBelow (k, root)) + const char * kStringVal = keyString (k); + if (keyIsBelow (k, root) && strlen (kStringVal) > 0) { argv[i] = "-r"; // NOTE argv[] values will not be modified, so const can be discarded safely - argv[i + 1] = (char *) keyString (k); + argv[i + 1] = (char *) kStringVal; i = i + 2; } }
libc: Partial implement fcntl()
@@ -545,22 +545,30 @@ int dup2(int src_fd, int dest_fd) { auto offer = parseSimple(element); auto send_req = parseSimple(element); auto recv_resp = parseInline(element); - auto pull_lane = parseHandle(element); HEL_CHECK(offer->error); HEL_CHECK(send_req->error); HEL_CHECK(recv_resp->error); - HEL_CHECK(pull_lane->error); managarm::posix::SvrResponse<MemoryAllocator> resp(getAllocator()); resp.ParseFromArray(recv_resp->data, recv_resp->length); __ensure(resp.error() == managarm::posix::Errors::SUCCESS); - return dest_fd; + return resp.fd(); } -int fcntl(int, int, ...) { - frigg::infoLogger() << "mlibc: Broken fcntl() called!" << frigg::endLog; - return 0; +int fcntl(int fd, int request, ...) { + if(request == F_DUPFD) { + return dup2(fd, -1); + }else if(request == F_DUPFD_CLOEXEC) { + frigg::infoLogger() << "\e[31mmlibc: fcntl(F_DUPFD_CLOEXEC) is not implemented correctly" + << "\e[39m" << frigg::endLog; + return dup2(fd, -1); + }else{ + frigg::infoLogger() << "\e[31mmlibc: Unexpected fcntl() request: " + << request << "\e[39m" << frigg::endLog; + errno = EINVAL; + return -1; + } } int isatty(int fd) { @@ -741,6 +749,12 @@ int tcsetattr(int, int, const struct termios *attr) { #include <libdrm/drm.h> int ioctl(int fd, unsigned long request, void *arg) { +// frigg::infoLogger() << "mlibc: ioctl with" +// << " type: 0x" << frigg::logHex(_IOC_TYPE(request)) +// << ", number: 0x" << frigg::logHex(_IOC_NR(request)) +// << " (raw request: " << frigg::logHex(request) << ")" +// << " on fd " << fd << frigg::endLog; + auto handle = cacheFileTable()[fd]; __ensure(handle);
sh/merge-with-custom-msg: 'origin' handling fix [ci skip] The KERNEL_CHANGED and PILLS_CHANGED variables used the revision with 'origin' stripped from it (intended for using in messages only), which caused them to miss remote revisions. Also tweaks the conditional so that the kernel diff only displays when pills haven't been updated.
@@ -41,17 +41,18 @@ fi REV=$1 PR=$2 -TARGET=$(echo $REV | sed s_origin/__) +KERNEL_CHANGED=`git diff --name-status $REV -- pkg/arvo/sys` +PILLS_CHANGED=`git diff --name-status $REV -- bin` -MERGE_MSG="Merge branch '$TARGET' (#$PR)" - -KERNEL_CHANGED=`git diff --name-status $TARGET -- pkg/arvo/sys` -PILLS_CHANGED=`git diff --name-status $TARGET -- bin` - -[[ ! -z $KERNEL_CHANGED && -z $PILLS_CHANGED ]] && \ +if [[ ! -z $KERNEL_CHANGED && -z $PILLS_CHANGED ]] +then echo "WARNING: kernel has changed, but pills have not" echo $KERNEL_CHANGED echo +fi + +TARGET_MSG=$(echo $REV | sed s_origin/__) +MERGE_MSG="Merge branch '$TARGET_MSG' (#$PR)" read -p "Proceed with merge? (y/n)" -n 1 -r echo
[build] Update Makefile
@@ -45,11 +45,18 @@ liball: done @echo "Done building libs." +liball-clean: + @for dir in $(LIBTOOLS); do \ + $(MAKE) PREFIX=$(LIBPATH) -C $(LIBPATH)/src/$$dir clean; \ + if [ $$? != 0 ]; then exit 1; fi; \ + done + @echo "Clean libs." + test: @go test -timeout 60s ./... -clean: +clean: liball-clean go clean rm -f $(BINPATH)/aergosvr rm -f $(BINPATH)/aergocli
Improve compilation speed: compiler only writes files with changed content
@@ -332,10 +332,25 @@ def beautify(filename): pass +def does_file_contain_text(filename, text): + """Returns True iff the file exists and it already contains the given text.""" + if os.path.isfile(filename): + with open(filename, "r") as infile: + intext = infile.read() + return text == intext + + return False + + def write_file(filename, text): """Writes the given text to the given file with optional beautification.""" + + if not does_file_contain_text(filename, text): with open(filename, "w") as genfile: genfile.write(text) + else: + if args['verbose']: + print("Skipping", filename) if args['beautify']: beautify(filename) @@ -385,8 +400,14 @@ def main(): print("FILE NOT FOUND: %s" % args['p4_file'], file=sys.stderr) sys.exit(1) + if args['verbose']: + print("Loading file", args['p4_file']) + success = load_file(args['p4_file']) + if args['verbose']: + print("Transforming HLIR") + transform_hlir16(hlir16) if not success: @@ -394,6 +415,8 @@ def main(): sys.exit(1) for filename in os.listdir(args['compiler_files_dir']): + if args['verbose']: + print("Compiling", filename) file_with_path = join(args['compiler_files_dir'], filename) if not isfile(file_with_path):
One more change to get auto-detection to work
-Copyright (c) 2018, the LSSTDESC CCL contributors. +Copyright (c) 2018, the LSSTDESC CCL contributors (https://github.com/LSSTDESC/CCL/graphs/contributors). All rights reserved. -The LSSTDESC CCL contributors are listed in the documentation -("research note") provided with this software. The repository can be -found at https://github.com/LSSTDESC/CCL. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
chat: prevent timestamp from overflowing
@@ -243,7 +243,7 @@ export class MessageWithSigil extends PureComponent<MessageProps> { }} title={`~${msg.author}`} >{name}</Text> - <Text gray mono className="v-mid">{timestamp}</Text> + <Text flexShrink='0' gray mono className="v-mid">{timestamp}</Text> <Text gray mono ml={2} className="v-mid child dn-s">{datestamp}</Text> </Box> <Box fontSize='14px'><MessageContent content={msg.letter} remoteContentPolicy={remoteContentPolicy} measure={measure} /></Box>
[numerics] set the best choice for rho by defaults in NSN one contact solvers
@@ -1033,8 +1033,8 @@ int fc3d_onecontact_nonsmooth_Newton_gp_setDefaultSolverOptions(SolverOptions* o /* Value of rho parameter */ /* options->iparam[SICONOS_FRICTION_3D_NSN_RHO_STRATEGY] = SICONOS_FRICTION_3D_NSN_FORMULATION_RHO_STRATEGY_CONSTANT; */ /* options->iparam[SICONOS_FRICTION_3D_NSN_RHO_STRATEGY] = SICONOS_FRICTION_3D_NSN_FORMULATION_RHO_STRATEGY_ADAPTIVE; */ - options->iparam[SICONOS_FRICTION_3D_NSN_RHO_STRATEGY] = SICONOS_FRICTION_3D_NSN_FORMULATION_RHO_STRATEGY_SPLIT_SPECTRAL_NORM_COND; - /* options->iparam[SICONOS_FRICTION_3D_NSN_RHO_STRATEGY] = SICONOS_FRICTION_3D_NSN_FORMULATION_RHO_STRATEGY_EIGEN; */ + /* options->iparam[SICONOS_FRICTION_3D_NSN_RHO_STRATEGY] = SICONOS_FRICTION_3D_NSN_FORMULATION_RHO_STRATEGY_SPLIT_SPECTRAL_NORM_COND; */ + options->iparam[SICONOS_FRICTION_3D_NSN_RHO_STRATEGY] = SICONOS_FRICTION_3D_NSN_FORMULATION_RHO_STRATEGY_SPLIT_SPECTRAL_NORM; options->dparam[SICONOS_FRICTION_3D_NSN_RHO] =1.0; /* Choice of formulation */
fix core issue when metadatacache disabled
@@ -1442,8 +1442,8 @@ fetch_hdfs_data_block_location(char *filepath, int64 len, int *block_num, *hit_ratio = 0.0; return NULL; } - BlockLocation *locations; - HdfsFileInfo *file_info; + BlockLocation *locations = NULL; + HdfsFileInfo *file_info = NULL; //double hit_ratio; uint64_t beginTime; beginTime = gettime_microsec(); @@ -1461,7 +1461,12 @@ fetch_hdfs_data_block_location(char *filepath, int64 len, int *block_num, } DestroyHdfsFileInfo(file_info); } else { - locations = HdfsGetFileBlockLocations(filepath, len, block_num); + BlockLocation *hdfs_locations = HdfsGetFileBlockLocations(filepath, len, block_num); + locations = CreateHdfsFileBlockLocations(hdfs_locations, *block_num); + if (hdfs_locations) + { + HdfsFreeFileBlockLocations(hdfs_locations, *block_num); + } } if (debug_print_split_alloc_result) { uint64 endTime = gettime_microsec();
Fix additional mis-spelling
@@ -4241,7 +4241,7 @@ int mbedtls_ssl_context_save( mbedtls_ssl_context *ssl, MBEDTLS_SSL_DEBUG_MSG( 1, ( "There is pending outgoing data" ) ); return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); } - /* Protocol must be DLTS, not TLS */ + /* Protocol must be DTLS, not TLS */ if( ssl->conf->transport != MBEDTLS_SSL_TRANSPORT_DATAGRAM ) { MBEDTLS_SSL_DEBUG_MSG( 1, ( "Only DTLS is supported" ) );
crypto: tutorial - download and install the Elektra key
@@ -35,6 +35,16 @@ If you have no GPG private key available, you can generate one by entering the f The `fcrypt` plugin and the `crypto` plugin support both versions (version 1 and version 2) of GPG. +In order to set up our tutorial we import the Elektra test key. +We **DO NOT RECOMMEND** to use our key on your local machine, as it is available to the public! + +```sh +curl -o test_key.asc https://raw.githubusercontent.com/ElektraInitiative/libelektra/master/src/plugins/crypto/test_key.asc +gpg2 --import test_key.asc +echo "trust-model always" > ~/.gnupg/gpg.conf +rm test_key.asc +``` + ## Introduction In this tutorial we explain the use of the `crypto` plugin and the `fcrypt` plugin by a simple example:
zephyr: zmake: add platform/ec/zephyr to DTS_ROOT This allows us to put a dts directory and include directory in platform/ec/zephyr for DTS preprocessing. BRANCH=none TEST=follow-up CLs
@@ -75,7 +75,12 @@ class Zmake: base_config = zmake.build_config.BuildConfig( environ_defs={'ZEPHYR_BASE': str(zephyr_base), 'PATH': '/usr/bin'}, - cmake_defs={'DTS_ROOT': module_paths['zephyr-chrome']}) + cmake_defs={'DTS_ROOT': '{};{}'.format( + # TODO(b/177003034): remove zephyr-chrome from here + # once all dts files have migrated to platform/ec. + module_paths['zephyr-chrome'], + module_paths['ec-shim'] / 'zephyr', + )}) module_config = zmake.modules.setup_module_symlinks( build_dir / 'modules', module_paths)
Short range fix to test code only: corrected test cleanup. Corrected cleanup in shortRangeSetBaudrate and shortRangeResetToDefaultSettings, to avoid double calls two uShortRangeClose and thus unexpected behaviour.
@@ -226,7 +226,6 @@ U_PORT_TEST_FUNCTION("[shortRange]", "shortRangeUartSetBaudrate") U_PORT_TEST_ASSERT(uShortRangeSetBaudrate(&gHandles.devHandle, &uart) == 0); U_PORT_TEST_ASSERT(uShortRangeAttention(gHandles.devHandle) == 0); } - uShortRangeClose(gHandles.devHandle); uShortRangeTestPrivateCleanup(&gHandles); uPortLog("U_SHORT_RANGE_TEST: shortRangeUartSetBaudrate succeded.\n"); } @@ -278,7 +277,7 @@ U_PORT_TEST_FUNCTION("[shortRange]", "shortRangeResetToDefaultSettings") uPortLog("U_SHORT_RANGE_TEST: Setting baudrate on host to %d\n", uart.baudRate); U_PORT_TEST_ASSERT(uShortRangeOpenUart(moduleType, &uart, false, &gHandles.devHandle) == 0); // target should already be at 115200 due to DTR reset - uShortRangeClose(gHandles.devHandle); + uShortRangeTestPrivateCleanup(&gHandles); uPortLog("U_SHORT_RANGE_TEST: shortRangeResetToDefaultSettings succeded.\n"); }
Docs: Minor update SyncRuntimePermissions text
@@ -1802,9 +1802,9 @@ To view their current state, use the \texttt{pmset -g} command in Terminal. This quirk attempts to update the memory map and memory attributes table to correct this. - \emph{Note}: The need for this quirk is indicated by early boot failures (e.g. halts at - black screen), particularly in early boot of the Linux kernel. - Only firmware released after 2017 is typically affected. + \emph{Note}: The need for this quirk is indicated by early boot failures (note: includes halt at black + screen as well as more obvious crash). Particularly likely to affect early boot of Windows or Linux (but + not always both) on affected systems. Only firmware released after 2017 is typically affected. \end{enumerate}
removed neff
@@ -554,17 +554,6 @@ static double ccl_dlninvsig_dlogm(ccl_cosmology *cosmo, double halomass, int*sta return val; } -/*----- ROUTINE: neff ------ - INPUT: - TASK: - */ -double neff(ccl_cosmology *cosmo, double halomass, int *status){ - - return 6.*ccl_dlninvsig_dlogm(cosmo, halomass, status)/log(10.)-3. - -} - - /*----- ROUTINE: ccl_massfunc ----- INPUT: ccl_cosmology * cosmo, double halo mass in units of Msun, double scale factor TASK: returns halo mass function as dn / dlog10 m
fix test s exit code & fmt
@@ -32,7 +32,7 @@ build_asan: run_test: rm -fr $(BUILD_TEST_DIR) && mkdir $(BUILD_TEST_DIR) && cd $(BUILD_TEST_DIR) && cmake -DCMAKE_BUILD_TYPE=Release "$(CMAKE_FLAGS)" .. && make -j2 && cd test # && ./odyssey_test - docker-compose -f docker-compose-test.yml up --force-recreate --build + docker-compose -f docker-compose-test.yml --exit-code-from up --force-recreate --build submit-cov: mkdir cov-build && cd cov-build
perf-tools/extrae: looks latest impi has moved location of libmpi.so; add additional flag to let extrae find it
@@ -45,7 +45,6 @@ This is the %{compiler_family}-%{mpi_family} version. %prep %setup -q -n %{pname}-%{version} -%patch1 -p0 %build # OpenHPC compiler/mpi designation @@ -61,7 +60,13 @@ export compiler_vars="CC=icc CXX=icpc MPICC=mpicc MPIF90=mpiifort" %endif ./bootstrap -./configure $compiler_vars --with-xml-prefix=/usr --with-papi=$PAPI_DIR --without-unwind --without-dyninst --disable-openmp-intel --prefix=%{install_path} --with-mpi=$MPI_DIR +./configure $compiler_vars --with-xml-prefix=/usr --with-papi=$PAPI_DIR --without-unwind \ + --without-dyninst --disable-openmp-intel --prefix=%{install_path} --with-mpi=$MPI_DIR \ +%if "%{mpi_family}" == "impi" + --with-mpi-libs=$MPI_DIR/lib/release \ +%endif + || { cat config.log && exit 1; } + make %{?_smp_mflags} %install
docs: update WW customization to optionally export /opt/intel; needed for oneapi
@@ -29,6 +29,22 @@ example configuration. # Export /home and OpenHPC public packages from master server [sms](*\#*) echo "/home *(rw,no_subtree_check,fsid=10,no_root_squash)" >> /etc/exports [sms](*\#*) echo "/opt/ohpc/pub *(ro,no_subtree_check,fsid=11)" >> /etc/exports +\end{lstlisting} + +\noindent If planning to install the \IntelR{} oneAPI compiler runtime +(see~\S\ref{sec:3rdparty_intel}), register the +following additional path to share with computes: + +% ohpc_command if [[ ${enable_intel_packages} -eq 1 ]];then +% ohpc_indent 5 +\begin{lstlisting}[language=bash,keywords={},upquote=true,keepspaces] +# (Optional) Export /opt/intel if planning to install oneAPI packages +[sms](*\#*) echo "/opt/intel *(ro,no_subtree_check,fsid=12)" >> /etc/exports +\end{lstlisting} +% ohpc_indent 0 +% ohpc_command fi +\begin{lstlisting}[language=bash,literate={-}{-}1,keywords={},upquote=true] +# Finalize NFS config and restart [sms](*\#*) exportfs -a [sms](*\#*) systemctl restart nfs-server [sms](*\#*) systemctl enable nfs-server
update json grab arm
~| a =+ ^- [wat=kind des=cord ses=(set @p)] %. a - (ot kind+(cu (hard kind) so) desc+so mems+(su (cook sy (more ace fed:ag))) ~) + :: ses expects an ace-delimited string of ship names + :: TODO change to an array of strings AA + (ot wat+(cu (hard kind) so) des+so ses+(su (cook sy (more ace fed:ag))) ~) ?> ?=([%o *] a) - =/ pub (~(has by p.a) %publ) - =/ vis (~(has by p.a) %visi) + =/ pub (~(has by p.a) %pub) + =/ vis (~(has by p.a) %vis) [wat des pub vis ses] :: ++ wain (su (more newline (cook crip (star prn))))
doc: Added enum and typedef conventions
@@ -16,6 +16,17 @@ When doing modifications to third-party code used in ESP-IDF, follow the way tha C Code Formatting ----------------- +.. _style-guide-naming: + +Naming +^^^^^^ + +* Any variable or function which is only used in a single source file should be declared ``static``. +* Public names (non-static variables and functions) should be namespaced with a per-component or per-unit prefix, to avoid naming collisions. ie ``esp_vfs_register()`` or ``esp_console_run()``. Starting the prefix with ``esp_`` for Espressif-specific names is optional, but should be consistent with any other names in the same component. +* Static variables should be prefixed with ``s_`` for easy identification. For example, ``static bool s_invert``. +* Avoid unnecessary abbreviations (ie shortening ``data`` to ``dat``), unless the resulting name would otherwise be very long. + + Indentation ^^^^^^^^^^^ @@ -187,6 +198,25 @@ To re-format a file, run:: tools/format.sh components/my_component/file.c +Type Definitions +^^^^^^^^^^^^^^^^ + +Should be snake_case, ending with _t suffix:: + + typedef int signed_32_bit_t; + +Enum +^^^^ + +Enums should be defined through the `typedef` and be namespaced:: + + typedef enum + { + MODULE_FOO_ONE, + MODULE_FOO_TWO, + MODULE_FOO_THREE + } module_foo_t; + C++ Code Formatting ------------------- @@ -341,19 +371,6 @@ Documenting Code Please see the guide here: :doc:`documenting-code`. -.. _style-guide-naming: - -Naming ------- - -- Any variable or function which is only used in a single source file should be declared ``static``. - -- Public names (non-static variables and functions) should be namespaced with a per-component or per-unit prefix, to avoid naming collisions. ie ``esp_vfs_register()`` or ``esp_console_run()``. Starting the prefix with ``esp_`` for Espressif-specific names is optional, but should be consistent with any other names in the same component. - -- Static variables should be prefixed with ``s_`` for easy identification. For example, ``static bool s_invert``. - -- Avoid unnecessary abbreviations (ie shortening ``data`` to ``dat``), unless the resulting name would otherwise be very long. - Structure ---------
Fix camera clamping issues
#define BUBBLE_TOTAL_FRAMES 60 void ScriptHelper_CalcDest(); +void ScriptHelper_ClampCamDest(); UBYTE *RAMPtr; // UINT16 actor_move_dest_x = 0; @@ -503,17 +504,7 @@ void Script_CameraMoveTo_b() { camera_settings = (UBYTE)script_cmd_args[2] & ~CAMERA_LOCK_FLAG; camera_speed = (UBYTE)script_cmd_args[2] & CAMERA_SPEED_MASK; - // Clamp Destination - if (camera_dest.x > image_width - SCREEN_WIDTH_HALF) { - camera_dest.x = image_width - SCREEN_WIDTH_HALF; - } else if (camera_dest.x < SCREEN_WIDTH_HALF) { - camera_dest.x = SCREEN_WIDTH_HALF; - } - if (camera_dest.y > image_height - SCREEN_HEIGHT_HALF) { - camera_dest.y = image_height - SCREEN_HEIGHT_HALF; - } else if (camera_dest.y < SCREEN_HEIGHT_HALF) { - camera_dest.y = SCREEN_HEIGHT_HALF; - } + ScriptHelper_ClampCamDest(); after_lock_camera = FALSE; script_update_fn = ScriptUpdate_MoveCamera; @@ -532,20 +523,24 @@ void Script_CameraLock_b() { camera_dest.x = player.pos.x; camera_dest.y = player.pos.y; - // Clamp Destination - if (camera_dest.x > image_width - SCREEN_WIDTH_HALF) { + ScriptHelper_ClampCamDest(); + + after_lock_camera = TRUE; + script_update_fn = ScriptUpdate_MoveCamera; +} + +void ScriptHelper_ClampCamDest() { + // Clamp Camera Destination + if (Gt16(camera_dest.x, image_width - SCREEN_WIDTH_HALF)) { camera_dest.x = image_width - SCREEN_WIDTH_HALF; - } else if (camera_dest.x < SCREEN_WIDTH_HALF) { + } else if (Lt16(camera_dest.x, SCREEN_WIDTH_HALF)) { camera_dest.x = SCREEN_WIDTH_HALF; } - if (camera_dest.y > image_height - SCREEN_HEIGHT_HALF) { + if (Gt16(camera_dest.y, image_height - SCREEN_HEIGHT_HALF)) { camera_dest.y = image_height - SCREEN_HEIGHT_HALF; - } else if (camera_dest.y < SCREEN_HEIGHT_HALF) { + } else if (Lt16(camera_dest.y, SCREEN_HEIGHT_HALF)) { camera_dest.y = SCREEN_HEIGHT_HALF; } - - after_lock_camera = TRUE; - script_update_fn = ScriptUpdate_MoveCamera; } /*
Changed private to public
@@ -9,7 +9,7 @@ namespace pimoroni { //-------------------------------------------------- // Constants //-------------------------------------------------- - private: + public: static const uint8_t DEFAULT_CS_PIN = 17; static const uint8_t DEFAULT_DC_PIN = 16; static const uint8_t DEFAULT_SCK_PIN = 18;
Update README.md Just want it to build
# ESP32 WROOM-32 -The current image is built with mbedTLS v2.16.2. +The current image is built with mbedTLS included in IDF v3.3.5 (v2.16.7). This reference target _fits_ all EPS32 boards carrying an ESP32-WROOM-32 module.
SOVERSION bump to version 2.4.3
@@ -63,7 +63,7 @@ set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_ # set version of the library set(LIBYANG_MAJOR_SOVERSION 2) set(LIBYANG_MINOR_SOVERSION 4) -set(LIBYANG_MICRO_SOVERSION 2) +set(LIBYANG_MICRO_SOVERSION 3) set(LIBYANG_SOVERSION_FULL ${LIBYANG_MAJOR_SOVERSION}.${LIBYANG_MINOR_SOVERSION}.${LIBYANG_MICRO_SOVERSION}) set(LIBYANG_SOVERSION ${LIBYANG_MAJOR_SOVERSION})
extmod/modussl_mbedtls: Use mbedtls_entropy_func for CTR-DRBG entropy. If mbedtls_ctr_drbg_seed() is available in the mbedtls bulid then so should be mbedtls_entropy_func(). Then it's up to the port to configure a valid entropy source, eg via MBEDTLS_ENTROPY_HARDWARE_ALT.
@@ -73,15 +73,6 @@ STATIC void mbedtls_debug(void *ctx, int level, const char *file, int line, cons } #endif -// TODO: FIXME! -STATIC int null_entropy_func(void *data, unsigned char *output, size_t len) { - (void)data; - (void)output; - (void)len; - // enjoy random bytes - return 0; -} - STATIC int _mbedtls_ssl_send(void *ctx, const byte *buf, size_t len) { mp_obj_t sock = *(mp_obj_t*)ctx; @@ -140,7 +131,7 @@ STATIC mp_obj_ssl_socket_t *socket_new(mp_obj_t sock, struct ssl_args *args) { mbedtls_entropy_init(&o->entropy); const byte seed[] = "upy"; - ret = mbedtls_ctr_drbg_seed(&o->ctr_drbg, null_entropy_func/*mbedtls_entropy_func*/, &o->entropy, seed, sizeof(seed)); + ret = mbedtls_ctr_drbg_seed(&o->ctr_drbg, mbedtls_entropy_func, &o->entropy, seed, sizeof(seed)); if (ret != 0) { goto cleanup; }
Fix CLOEXEC to be mac-compatible.
@@ -19,7 +19,7 @@ struct _transport_t cfg_transport_t type; ssize_t (*send)(int, const void *, size_t, int); int (*open)(const char *, int, ...); - int (*dup3)(int, int, int); + int (*dup2)(int, int); int (*close)(int); int (*fcntl)(int, int, ...); size_t (*fwrite)(const void *, size_t, size_t, FILE *); @@ -69,7 +69,7 @@ newTransport() if ((t->send = dlsym(RTLD_NEXT, "send")) == NULL) goto out; if ((t->open = dlsym(RTLD_NEXT, "open")) == NULL) goto out; - if ((t->dup3 = dlsym(RTLD_NEXT, "dup3")) == NULL) goto out; + if ((t->dup2 = dlsym(RTLD_NEXT, "dup2")) == NULL) goto out; if ((t->close = dlsym(RTLD_NEXT, "close")) == NULL) goto out; if ((t->fcntl = dlsym(RTLD_NEXT, "fcntl")) == NULL) goto out; if ((t->fwrite = dlsym(RTLD_NEXT, "fwrite")) == NULL) goto out; @@ -82,10 +82,10 @@ newTransport() return t; out: - DBG("send=%p open=%p dup3=%p close=%p " + DBG("send=%p open=%p dup2=%p close=%p " "fcntl=%p fwrite=%p socket=%p connect=%p " "getaddrinfo=%p fclose=%p fdopen=%p", - t->send, t->open, t->dup3, t->close, + t->send, t->open, t->dup2, t->close, t->fcntl, t->fwrite, t->socket, t->connect, t->getaddrinfo, t->fclose, t->fdopen); free(t); @@ -117,9 +117,17 @@ placeDescriptor(int fd, transport_t *t) for (i = next_fd_to_try; i >= DEFAULT_MIN_FD; i--) { if ((t->fcntl(i, F_GETFD) == -1) && (errno == EBADF)) { - // This fd is available - if ((dupfd = t->dup3(fd, i, O_CLOEXEC)) == -1) continue; + + // This fd is available, try to dup it + if ((dupfd = t->dup2(fd, i)) == -1) continue; t->close(fd); + + // Set close on exec. (dup2 does not preserve FD_CLOEXEC) + int flags = t->fcntl(dupfd, F_GETFD, 0); + if (t->fcntl(dupfd, F_SETFD, flags | FD_CLOEXEC) == -1) { + DBG("%d", dupfd); + } + next_fd_to_try = dupfd - 1; return dupfd; } @@ -595,12 +603,6 @@ transportConnectFile(transport_t *t) DBG("%d %s", fd, t->file.path); } - // set close on exec - int flags = t->fcntl(fd, F_GETFD, 0); - if (t->fcntl(fd, F_SETFD, flags | FD_CLOEXEC) == -1) { - DBG("%d %s", fd, t->file.path); - } - FILE* f; if (!(f = t->fdopen(fd, "a"))) { transportDisconnect(t);
resolve defects: reverse_inull; row[DB_exp_date] referenced before checking
@@ -1924,8 +1924,8 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, row[DB_exp_date][tm->length] = '\0'; row[DB_rev_date] = NULL; row[DB_file] = OPENSSL_strdup("unknown"); - if ((row[DB_type] == NULL) || (row[DB_exp_date] == NULL) || - (row[DB_file] == NULL) || (row[DB_name] == NULL)) { + if ((row[DB_type] == NULL) || (row[DB_file] == NULL) + || (row[DB_name] == NULL)) { BIO_printf(bio_err, "Memory allocation failure\n"); goto end; }
list: fix placements
@@ -33,6 +33,8 @@ typedef enum getEnd } GetPlacements; +static const char * getStrings[] = { "pregetstorage", "procgetstorage", "postgetstorage", "postgetcleanup" }; + typedef enum { preSetStorage = 0, @@ -42,6 +44,8 @@ typedef enum setEnd } SetPlacements; +static const char * setStrings[] = { "presetstorage", "presetcleanup", "precommit", "postcommit" }; + typedef enum { preRollback = 0, @@ -49,6 +53,8 @@ typedef enum errEnd } ErrPlacements; +static const char * errStrings[] = { "prerollback", "postrollback" }; + typedef enum { GET, @@ -113,7 +119,6 @@ static int listParseConfiguration (Placements * placements, KeySet * config) if (sub) { const char * setString = keyString (sub); - const char * setStrings[] = { "presetstorage", "presetcleanup", "precommit", "postcommit" }; SetPlacements setPlacement = preSetStorage; while (setPlacement != setEnd) { @@ -130,7 +135,6 @@ static int listParseConfiguration (Placements * placements, KeySet * config) if (sub) { const char * getString = keyString (sub); - const char * getStrings[] = { "pregetstorage", "procgetstorage", "postgetstorage", "postgetcleanup" }; GetPlacements getPlacement = preGetStorage; while (getPlacement != getEnd) { @@ -147,7 +151,6 @@ static int listParseConfiguration (Placements * placements, KeySet * config) if (sub) { const char * errString = keyString (sub); - const char * errStrings[] = { "prerollback", "postrollback" }; ErrPlacements errPlacement = preRollback; while (errPlacement != errEnd) { @@ -215,7 +218,6 @@ int elektraListOpen (Plugin * handle, Key * errorKey ELEKTRA_UNUSED) if (key) { const char * setString = keyString (key); - const char * setStrings[] = { "presetstorage", "presetcleanup", "precommit", "postcommit" }; SetPlacements setPlacement = preSetStorage; while (setPlacement != setEnd) { @@ -230,7 +232,6 @@ int elektraListOpen (Plugin * handle, Key * errorKey ELEKTRA_UNUSED) if (key) { const char * getString = keyString (key); - const char * getStrings[] = { "pregetstorage", "postgetstorage", "postgetcleanup" }; GetPlacements getPlacement = preGetStorage; while (getPlacement != getEnd) { @@ -245,7 +246,6 @@ int elektraListOpen (Plugin * handle, Key * errorKey ELEKTRA_UNUSED) if (key) { const char * errString = keyString (key); - const char * errStrings[] = { "prerollback", "postrollback" }; ErrPlacements errPlacement = preRollback; while (errPlacement != errEnd) {
libtock: don't use nested functions Clang doesn't support nested functions. For compatibility with Clang, remove their use.
@@ -166,28 +166,28 @@ void timer_cancel(tock_timer_t* timer) { alarm_cancel(&timer->alarm); } -void delay_ms(uint32_t ms) { - void delay_upcall(__attribute__ ((unused)) int unused0, +static void delay_upcall(__attribute__ ((unused)) int unused0, __attribute__ ((unused)) int unused1, __attribute__ ((unused)) int unused2, void* ud) { *((bool*)ud) = true; } +void delay_ms(uint32_t ms) { bool cond = false; tock_timer_t timer; timer_in(ms, delay_upcall, &cond, &timer); yield_for(&cond); } -int yield_for_with_timeout(bool* cond, uint32_t ms) { - void yield_for_timeout_upcall(__attribute__ ((unused)) int unused0, +static void yield_for_timeout_upcall(__attribute__ ((unused)) int unused0, __attribute__ ((unused)) int unused1, __attribute__ ((unused)) int unused2, void* ud) { *((bool*)ud) = true; } +int yield_for_with_timeout(bool* cond, uint32_t ms) { bool timeout = false; tock_timer_t timer; timer_in(ms, yield_for_timeout_upcall, &timeout, &timer);
fwcfg64: preparation for ARM64 build The project prepared for ARM64 build, but the build of this configuration is disabled. It can be enabled after mandatory definitions added for ARM64.
<Configuration>Win10 Release</Configuration> <Platform>x64</Platform> </ProjectConfiguration> + <ProjectConfiguration Include="Win10 Release|ARM64"> + <Configuration>Win10 Release</Configuration> + <Platform>ARM64</Platform> + </ProjectConfiguration> <ProjectConfiguration Include="Win8.1 Release|x64"> <Configuration>Win8.1 Release</Configuration> <Platform>x64</Platform> <DriverType>KMDF</DriverType> <KMDF_VERSION_MINOR>15</KMDF_VERSION_MINOR> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|ARM64'" Label="Configuration"> + <TargetVersion> + </TargetVersion> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> + <ConfigurationType>Driver</ConfigurationType> + <DriverType>KMDF</DriverType> + <KMDF_VERSION_MINOR>15</KMDF_VERSION_MINOR> + </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|x64'" Label="Configuration"> <TargetVersion>WindowsV6.3</TargetVersion> <UseDebugLibraries>false</UseDebugLibraries> <OutDir>objfre_win10_amd64\amd64\</OutDir> <IntDir>objfre_win10_amd64\amd64\</IntDir> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|ARM64'"> + <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor> + <OutDir>objfre_win10_arm64\arm64\</OutDir> + <IntDir>objfre_win10_arm64\arm64\</IntDir> + </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|x64'"> <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor> <OutDir>objfre_win8.1_amd64\amd64\</OutDir> <MultiProcessorCompilation>true</MultiProcessorCompilation> </ClCompile> </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|ARM64'"> + <ClCompile> + <WppEnabled>true</WppEnabled> + <WppScanConfigurationData Condition="'%(ClCompile. ScanConfigurationData)' == ''">trace.h</WppScanConfigurationData> + <WppKernelMode>true</WppKernelMode> + <TreatWarningAsError>true</TreatWarningAsError> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + </ClCompile> + </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|x64'"> <ClCompile> <WppEnabled>true</WppEnabled>
added vtk libraries to assure they are added
@@ -155,6 +155,7 @@ ${SIMV2_PLUGIN_DIR} LINK_DIRECTORIES( ${LIBRARY_OUTPUT_DIRECTORY} +${VTK_LIBRARY_DIRS} ${ICET_LIBRARY_DIR} ) @@ -173,7 +174,7 @@ VISIT_INSTALL_TARGETS(simV2runtime_ser) IF(VISIT_PARALLEL) ADD_PARALLEL_LIBRARY(simV2runtime_par ${LIBSIM_RUNTIME_SOURCES} ${LIBSIM_STATIC_SOURCES}) - TARGET_LINK_LIBRARIES(simV2runtime_par engine_par ${LIBSIM_RUNTIME_VIEWER_LIBS_PAR}) + TARGET_LINK_LIBRARIES(simV2runtime_par engine_par ${VTK_LIBRARIES} ${LIBSIM_RUNTIME_VIEWER_LIBS_PAR}) IF(NOT APPLE) SET_TARGET_PROPERTIES(simV2runtime_par PROPERTIES INSTALL_RPATH "$ORIGIN") ENDIF(NOT APPLE) @@ -183,4 +184,3 @@ IF(VISIT_PARALLEL) VISIT_INSTALL_TARGETS(simV2runtime_par) ENDIF(VISIT_PARALLEL) -
Fixes a wrong function signature
@@ -114,7 +114,7 @@ static bool extractBundleEmbedded(celix_framework_t *fw, const char* embeddedBun return status == CELIX_SUCCESS; } -bool celix_framework_utils_extractBundle(celix_framework_t *fw, const char *bundleURL, const char* extractPath) { +celix_status_t celix_framework_utils_extractBundle(celix_framework_t *fw, const char *bundleURL, const char* extractPath) { if (celix_utils_isStringNullOrEmpty(bundleURL)) { FW_LOG(CELIX_LOG_LEVEL_ERROR, "Invalid NULL or empty bundleURL argument"); return CELIX_ILLEGAL_ARGUMENT;
hv: Not to destroy ept of trusty memory if it's not initialized. If guest reboot is issued before trusty init hypercall is issued, we shouldn't destroy ept fo trusty memory because the ept is not created yet. Acked-by: Anthony Xu
@@ -125,8 +125,15 @@ void destroy_ept(struct vm *vm) { free_ept_mem(HPA2HVA(vm->arch_vm.nworld_eptp)); free_ept_mem(HPA2HVA(vm->arch_vm.m2p)); - /* Destroy Secure world ept */ - if (vm->sworld_control.sworld_enabled) + + /* + * If secure world is initialized, destroy Secure world ept. + * There are two cases secure world is not initialized: + * - trusty is not enabled. Check sworld_enabled. + * - trusty is enabled. But not initialized yet. + * Check vm->arch_vm.sworld_eptp. + */ + if (vm->sworld_control.sworld_enabled && vm->arch_vm.sworld_eptp) free_ept_mem(HPA2HVA(vm->arch_vm.sworld_eptp)); }
Required: Use fence for code block
@@ -35,11 +35,13 @@ If you used [simplespeclang](/src/plugins/simplespeclang) and want to only allow keys that are present in the specification, you can add `required` to the `spec-mount` command: - % kdb mount test.spec spec/test simplespeclang - % cat << HERE > `kdb file spec/test` +```sh +kdb mount test.spec spec/test simplespeclang +cat << HERE > `kdb file spec/test` plugins required enum allowed = something HERE - % kdb spec-mount /test - % kdb set /test/allowed something # is specified, works! - % kdb set /test/rejected something # fails because rejected not required +kdb spec-mount /test +kdb set /test/allowed something # is specified, works! +kdb set /test/rejected something # fails because rejected not required +```
api: add DSCP definitions to ip_types.api also adds ecn definitions. Type: feature
@@ -22,11 +22,57 @@ enum address_family { ADDRESS_IP6, }; +/* ECN code points - RFC 3168 + https://tools.ietf.org/html/rfc3168 +*/ +enum ip_ecn : u8 { + IP_API_ECN_NONE = 0, + IP_API_ECN_ECT0 = 1, + IP_API_ECN_ECT1 = 2, + IP_API_ECN_CE = 3, +}; + +/* DSCP code points - RFC 2474 + https://tools.ietf.org/html/rfc2474 +*/ + +enum ip_dscp : u8 { + IP_API_DSCP_CS0 = 0, + IP_API_DSCP_CS1 = 8, + IP_API_DSCP_AF11 = 10, + IP_API_DSCP_AF12 = 12, + IP_API_DSCP_AF13 = 14, + IP_API_DSCP_CS2 = 16, + IP_API_DSCP_AF21 = 18, + IP_API_DSCP_AF22 = 20, + IP_API_DSCP_AF23 = 22, + IP_API_DSCP_CS3 = 24, + IP_API_DSCP_AF31 = 26, + IP_API_DSCP_AF32 = 28, + IP_API_DSCP_AF33 = 30, + IP_API_DSCP_CS4 = 32, + IP_API_DSCP_AF41 = 34, + IP_API_DSCP_AF42 = 36, + IP_API_DSCP_AF43 = 38, + IP_API_DSCP_CS5 = 40, + IP_API_DSCP_EF = 46, + IP_API_DSCP_CS6 = 48, + IP_API_DSCP_CS7 = 50, +}; + enum ip_proto { + IP_API_PROTO_HOPOPT = 0, + IP_API_PROTO_ICMP = 1, + IP_API_PROTO_IGMP = 2, IP_API_PROTO_TCP = 6, IP_API_PROTO_UDP = 17, + IP_API_PROTO_GRE = 47, + IP_API_PROTO_AH = 50, + IP_API_PROTO_ESP = 51, IP_API_PROTO_EIGRP = 88, IP_API_PROTO_OSPF = 89, + IP_API_PROTO_SCTP = 132, + IP_API_PROTO_RESERVED = 255, }; union address_union {
[io vview] fix visibility of actors with len(contactors)>1
@@ -917,6 +917,7 @@ with Hdf5(io_filename=io_filename, mode='r') as io: contactors[instance] = [] transforms[instance] = [] offsets[instance] = [] + actors[instance] = [] for contactor_instance_name in io.instances()[instance_name]: contactor_name = io.instances()[instance_name][ contactor_instance_name].attrs['name'] @@ -932,7 +933,7 @@ with Hdf5(io_filename=io_filename, mode='r') as io: actor.GetProperty().SetColor(random_color()) actor.SetMapper(fixed_mappers[contactor_name]) - actors[instance] = actor + actors[instance].append(actor) renderer.AddActor(actor) transform = vtk.vtkTransform() @@ -979,7 +980,7 @@ with Hdf5(io_filename=io_filename, mode='r') as io: spos_data = spos_data[:].copy() def set_actors_visibility(id_t=None): - for instance, actor in actors.items(): + for instance, actorlist in actors.items(): # Instance is a static object visible = instance < 0 # Instance is in the current timestep @@ -992,9 +993,9 @@ with Hdf5(io_filename=io_filename, mode='r') as io: if io.instances()[k].attrs['id'] == instance][0] visible = visible or tob <= 0 if visible: - actor.VisibilityOn() + [actor.VisibilityOn() for actor in actorlist] else: - actor.VisibilityOff() + [actor.VisibilityOff() for actor in actorlist] if cf_prov is not None: for mu in cf_prov._mu_coefs: @@ -1226,9 +1227,10 @@ with Hdf5(io_filename=io_filename, mode='r') as io: return (pos_data[id_t[0][id_], 2], pos_data[id_t[0][id_], 3], pos_data[id_t[0][id_], 4]) def set_opacity(self): - for instance, actor in actors.items(): + for instance, actorlist in actors.items(): if instance >= 0: - actor.GetProperty().SetOpacity(self._opacity) + [actor.GetProperty().SetOpacity(self._opacity) + for actor in actorlist] def key(self, obj, event): global cf_prov
arch/sim: fix compile break when using mallinfo_task with custom mm manager /usr/bin/ld: nuttx.rel: in function `mallinfo_task': nuttx/mm/umm_heap/umm_mallinfo.c:67: undefined reference to `mm_mallinfo_task'
@@ -388,6 +388,21 @@ int mm_mallinfo(struct mm_heap_s *heap, struct mallinfo *info) return 0; } +/**************************************************************************** + * Name: mm_mallinfo_task + * + * Description: + * mallinfo_task returns a copy of updated current task's heap information. + * + ****************************************************************************/ + +int mm_mallinfo_task(struct mm_heap_s *heap, struct mallinfo_task *info) +{ + info->aordblks = 0; + info->uordblks = 0; + return 0; +} + /**************************************************************************** * Name: mm_memdump *
correct discussion reference
- set minimum number of default memcache threads to 0 to retain backwards compatibility see #916 - support OIDCSessionInactivityTimeout values greater than 30 days when using Memcache - see #935, thanks @takesson + see #936, thanks @takesson - bump to 2.4.11.4rc6 10/03/2022
Disable controls while SPI is switched to MCU
@@ -46,6 +46,18 @@ lms7002_mainPanel::~lms7002_mainPanel() void lms7002_mainPanel::UpdateVisiblePanel() { + wxWindow* currentPage = tabsNotebook->GetCurrentPage(); + uint16_t spisw_ctrl = 0; + LMS_ReadLMSReg(lmsControl, 0x0006, &spisw_ctrl); + if(spisw_ctrl & 1) // transceiver controlled by MCU + { + if(currentPage != mTabMCU && currentPage != mTabTrxGain) + currentPage->Disable(); + return; + } + else + currentPage->Enable(); + wxLongLong t1, t2; t1 = wxGetUTCTimeMillis(); long visibleTabId = tabsNotebook->GetCurrentPage()->GetId();
VERSION bump to version 1.4.101
@@ -46,7 +46,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 100) +set(SYSREPO_MICRO_VERSION 101) set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION}) # Version of the library
tests: Actually fix relation check
@@ -220,11 +220,11 @@ static void test_examples (void) keySetName (key, "user/key/folder"); keySetName (check, "user/notsame/folder"); - succeed_if (!(keyCmp (key, check) == 1 && keyIsDirectBelow (key, check) == 0 && keyIsBelow (key, check) == 0), "key is not below"); + succeed_if (keyCmp (key, check) != 0 && keyIsDirectBelow (key, check) == 0 && keyIsBelow (key, check) == 0, "key is not below"); keySetName (key, "user/key/folder"); keySetName (check, "system/notsame/folder"); - int has_no_rel = !(keyCmp (key, check) == 1 && keyIsDirectBelow (key, check) == 0 && keyIsBelow (key, check) == 0); + int has_no_rel = keyCmp (key, check) != 0 && keyIsDirectBelow (key, check) == 0 && keyIsBelow (key, check) == 0; succeed_if (has_no_rel == 1, "not in the same namespace"); keyDel (key); @@ -248,13 +248,13 @@ static void test_hierarchy (void) keySetName (key, "user/key/folder/key"); keySetName (check, "system/other/folder/key"); - int has_no_rel = !(keyCmp (key, check) == 1 && keyIsDirectBelow (key, check) == 0 && keyIsBelow (key, check) == 0); + int has_no_rel = keyCmp (key, check) != 0 && keyIsDirectBelow (key, check) == 0 && keyIsBelow (key, check) == 0; succeed_if (has_no_rel == 1, "should be different (1)"); keySetName (key, "system/key/folder/key"); keySetName (check, "user/other/folder/key"); - has_no_rel = !(keyCmp (key, check) == 1 && keyIsDirectBelow (key, check) == 0 && keyIsBelow (key, check) == 0); + has_no_rel = keyCmp (key, check) != 0 && keyIsDirectBelow (key, check) == 0 && keyIsBelow (key, check) == 0; succeed_if (has_no_rel == 1, "should be different (2)"); keyDel (key); keyDel (check);
Disable EXPRECISION for DYNAMIC_ARCH in combination with TARGET=GENERIC NO_EXPRECISION is disabled for the GENERIC_TARGET already, so prevent mixing with code parts that use a different float size by default
@@ -93,6 +93,11 @@ endif ifdef TARGET GETARCH_FLAGS := -DFORCE_$(TARGET) GETARCH_FLAGS += -DUSER_TARGET +ifeq ($(TARGET), GENERIC) +ifeq ($(DYNAMIC_ARCH), 1) +override NO_EXPRECISION=1 +endif +endif endif # Force fallbacks for 32bit
README.md: Update Ubuntu 18.04 build: Add sound Sound missing when following build instructions in Ubuntu 18.04. See
@@ -96,7 +96,7 @@ sudo sh cmake-3.12.0-Linux-x86_64.sh --skip-license --prefix=/usr run the following commands in the Terminal ``` -sudo apt-get install g++ git cmake libgtk-3-dev libglvnd-dev libglu1-mesa-dev freeglut3-dev -y +sudo apt-get install g++ git cmake libgtk-3-dev libglvnd-dev libglu1-mesa-dev freeglut3-dev libasound2-dev -y git clone --recursive https://github.com/nesbox/TIC-80 && cd TIC-80/build cmake .. make -j4
system/hexed: fix error: 'memset' used with length equal to number of elements without multiplication by element size
* Copyright (c) 2011, B.ZaaR, All rights reserved. * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: + * modification, are permitted provided that the following conditions are + * met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * products derived from this software without specific prior written * permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ****************************************************************************/ @@ -60,7 +61,9 @@ static int move(FAR struct command_s *cmd) static int moveover(FAR struct command_s *cmd) { - long cnt, len, off; + long cnt; + long len; + long off; bfmove(g_hexfile, cmd->opts.dest, cmd->opts.src, cmd->opts.bytes); @@ -68,7 +71,7 @@ static int moveover(FAR struct command_s *cmd) if (cmd->opts.src < cmd->opts.dest) { - memset(cmd->opts.buf, 0, OPT_BUF_SZ); + memset(cmd->opts.buf, 0, sizeof(cmd->opts.buf)); len = OPT_BUF_SZ; cnt = cmd->opts.bytes; off = cmd->opts.dest - cmd->opts.bytes; @@ -162,8 +165,8 @@ static int setmove(FAR struct command_s *cmd, int optc, char *opt) switch (optc) { - case 0: + /* Set source */ cmd->opts.src = v; @@ -171,6 +174,7 @@ static int setmove(FAR struct command_s *cmd, int optc, char *opt) break; case 1: + /* Set destination */ cmd->opts.dest = v; @@ -178,6 +182,7 @@ static int setmove(FAR struct command_s *cmd, int optc, char *opt) break; case 2: + /* Set length */ cmd->opts.len = v; @@ -186,6 +191,7 @@ static int setmove(FAR struct command_s *cmd, int optc, char *opt) break; default: + /* Too many options specified */ return -E2BIG;
virtual_battery: support reading SpecificationInfo TEST=check sbs-battery from host side BRANCH=None
@@ -318,6 +318,11 @@ int virtual_battery_operation(const uint8_t *batt_cmd_head, case SB_MANUFACTURER_ACCESS: /* No manuf. access reg access allowed over VB interface */ return EC_ERROR_INVAL; + case SB_SPECIFICATION_INFO: + /* v1.1 without PEC, no scale factor to voltage and current */ + val = 0x0011; + memcpy(dest, &val, bounded_read_len); + break; default: CPRINTS("Unhandled VB reg %x", *batt_cmd_head); return EC_ERROR_INVAL;
Fix compilation error introduced by previous commit.
@@ -30,7 +30,7 @@ extern "C" { #define CELIX_EI_GET_CALLER(addr, level) \ do { \ Dl_info dlinfo; \ - assert(dladdr(__builtin_return_address((level), &dlinfo)); \ + dladdr(__builtin_return_address(level), &dlinfo); \ (addr) = dlinfo.dli_saddr; \ } while(0)
tools: RAS fix device id read logic for Integrated and Discrete fpga Changes: - Ras tool support for Integrated and Discrete fpga
@@ -1072,7 +1072,7 @@ fpga_result mmio_error(struct RASCommandLine *rasCmdLine) return result; } - if( (value != FPGA_INTEGRATED_DEVICEID) || + if( (value != FPGA_INTEGRATED_DEVICEID) && (value != FPGA_DISCRETE_DEVICEID) ) { FPGA_ERR("Failed to read Device id"); return FPGA_NOT_SUPPORTED;
tools: try to fix ABI break
@@ -31,9 +31,11 @@ namespace tools class PluginSpec { public: + /* TODO: add with ABI break? PluginSpec () { } + */ explicit PluginSpec (std::string pluginName, KeySet pluginConfig = KeySet ());
Use the secondary background color for the sidebar but when it's not actually on the side
@@ -373,15 +373,11 @@ public struct SidebarNavigation: View { self.viewControllerStore.vc?.present(navVC, animated: true, completion: nil) }, label: { Image(systemName: "gear") - })) + }).padding(5).hover()) .onAppear { - if stack { - UITableView.appearance().backgroundColor = .systemBackground - } else { UITableView.appearance().backgroundColor = .secondarySystemBackground } } - } /// Returns an editor. var editor: some View {
Reorder function prototypes for consistency.
#include "utils/snapmgr.h" static BTMetaPageData *_bt_getmeta(Relation rel, Buffer metabuf); +static void _bt_log_reuse_page(Relation rel, BlockNumber blkno, + TransactionId latestRemovedXid); +static TransactionId _bt_xid_horizon(Relation rel, Relation heapRel, Page page, + OffsetNumber *deletable, int ndeletable); +static bool _bt_lock_branch_parent(Relation rel, BlockNumber child, + BTStack stack, Buffer *topparent, OffsetNumber *topoff, + BlockNumber *target, BlockNumber *rightsib); static bool _bt_mark_page_halfdead(Relation rel, Buffer leafbuf, BTStack stack); static bool _bt_unlink_halfdead_page(Relation rel, Buffer leafbuf, @@ -42,13 +49,6 @@ static bool _bt_unlink_halfdead_page(Relation rel, Buffer leafbuf, bool *rightsib_empty, TransactionId *oldestBtpoXact, uint32 *ndeleted); -static TransactionId _bt_xid_horizon(Relation rel, Relation heapRel, Page page, - OffsetNumber *deletable, int ndeletable); -static bool _bt_lock_branch_parent(Relation rel, BlockNumber child, - BTStack stack, Buffer *topparent, OffsetNumber *topoff, - BlockNumber *target, BlockNumber *rightsib); -static void _bt_log_reuse_page(Relation rel, BlockNumber blkno, - TransactionId latestRemovedXid); /* * _bt_initmetapage() -- Fill a page buffer with a correct metapage image
kukui: scp: Make comment for EC_FEATURE_SCP better. Since SCP is not a feature that EC can "support", change the wording of the comment to explain better. BRANCH=None TEST=None Commit-Ready: ChromeOS CL Exonerator Bot
@@ -1340,7 +1340,7 @@ enum ec_feature_code { EC_FEATURE_REFINED_TABLET_MODE_HYSTERESIS = 37, /* EC supports audio codec. */ EC_FEATURE_AUDIO_CODEC = 38, - /* EC Supports SCP. */ + /* The MCU is a System Companion Processor (SCP). */ EC_FEATURE_SCP = 39, /* The MCU is an Integrated Sensor Hub */ EC_FEATURE_ISH = 40,
Fix ecparam -genkey with point compression or DER outform
@@ -384,6 +384,9 @@ int ecparam_main(int argc, char **argv) "}\n"); } + if (outformat == FORMAT_ASN1 && genkey) + noout = 1; + if (!noout) { if (outformat == FORMAT_ASN1) i = i2d_ECPKParameters_bio(out, group); @@ -410,6 +413,9 @@ int ecparam_main(int argc, char **argv) goto end; } + if (new_form) + EC_KEY_set_conv_form(eckey, form); + if (!EC_KEY_generate_key(eckey)) { BIO_printf(bio_err, "unable to generate key\n"); EC_KEY_free(eckey);
testing/helpers: Use testing.TB instead of testing.T Those helpers are also useful for Benchmarks, then use the common interface of testing.{T,B,F}
@@ -29,7 +29,7 @@ import ( // CreateMntNsFilterMap creates and fills an eBPF map that can be used // to filter by mount namespace in the different tracers. -func CreateMntNsFilterMap(t *testing.T, mountNsIDs ...uint64) *ebpf.Map { +func CreateMntNsFilterMap(t testing.TB, mountNsIDs ...uint64) *ebpf.Map { t.Helper() const one = uint32(1) @@ -58,7 +58,7 @@ func CreateMntNsFilterMap(t *testing.T, mountNsIDs ...uint64) *ebpf.Map { } // RequireRoot skips the test if the not running as root -func RequireRoot(t *testing.T) { +func RequireRoot(t testing.TB) { t.Helper() if unix.Getuid() != 0 { @@ -66,7 +66,7 @@ func RequireRoot(t *testing.T) { } } -func RequireKernelVersion(t *testing.T, expectedVersion *kernel.VersionInfo) { +func RequireKernelVersion(t testing.TB, expectedVersion *kernel.VersionInfo) { version, err := kernel.GetKernelVersion() if err != nil { t.Fatalf("Failed to get kernel version: %s", err) @@ -133,7 +133,7 @@ func ExpectOneEvent[Event any, Extra any](getEvent func(info *RunnerInfo, extra expectedEvent := getEvent(info, extra) if len(events) != 1 { - t.Fatalf("More than one event found") + t.Fatalf("One event expected, found: %d", len(events)) } if !reflect.DeepEqual(expectedEvent, &events[0]) {
fix: Fixed that creat wallet failed and also occupied wallet limits issue A temporary repair
@@ -299,6 +299,7 @@ BSINT32 BoatWalletCreate(BoatProtocolType protocol_type, const BCHAR *wallet_nam { BoatLog(BOAT_LOG_NORMAL, "persistent wallet load failed."); BoatFree(boatwalletStore_ptr); + g_boat_iot_sdk_context.wallet_list[i].is_used = BOAT_FALSE; return BOAT_ERROR_PERSISTER_READ_FAIL; } //
Refactoring: remove repeated code
@@ -82,7 +82,7 @@ int grib_datetime_to_julian_d( long year, long month, long day, long hour, long minute, double second, double* jd) { - double a, b, dday; + double a, b = 0, dday; long y, m; dday = (double)(hour * 3600 + minute * 60 + second) / 86400.0 + day; @@ -97,22 +97,10 @@ int grib_datetime_to_julian_d( } a = (long)(((double)y) / 100); - if (y > 1582) + if (y > 1582 || + (y == 1582 && ((m > 10) || (m == 10 && day > 14)))) { b = 2 - a + (long)(a / 4); - else if (y == 1582) { - if (m > 10) - b = 2 - a + (long)(a / 4); - else if (m == 10) { - if (day > 14) - b = 2 - a + (long)(a / 4); - else - b = 0; } - else - b = 0; - } - else - b = 0; *jd = (long)(365.25 * (y + 4716)) + (long)(30.6001 * (m + 1)) + dday + b - 1524.5;
vere: clean up refcounts, debug printf
@@ -496,7 +496,6 @@ _pier_on_scry_done(void* ptr_v, u3_noun nun) u3_atom out; c3_c* ext_c; { - u3l_log("xxx\n"); u3_atom puf = u3i_string(u3_Host.ops_u.puf_c); if ( c3y == u3r_sing(c3__jam, puf) ) { out = u3qe_jam(res); @@ -506,6 +505,7 @@ _pier_on_scry_done(void* ptr_v, u3_noun nun) out = u3dc("scot", puf, u3k(res)); ext_c = "txt"; } + u3z(puf); } c3_c* pac_c = u3_Host.ops_u.puk_c;
Coding: Extend Clang-Format install instructions
@@ -166,7 +166,13 @@ or by installing the whole [LLVM](http://llvm.org) infrastructure: brew install llvm ``` -. Please note, that both of these commands will install current versions of `clang-format` that might format code a little bit differently than Clang-Format `6.0` in certain edge cases. +. Please note, that both of these commands will install current versions of `clang-format` that might format code a little bit differently than Clang-Format `6.0` in certain edge cases. If you want you can also install Clang-Format `7.0` using LLVM `7.0`: + +``` +brew install llvm@7 +``` + +. ###### Debian
Add __declspec(noreturn) to terminate_non_graceful() on Windows Informs the compiler that the function never returns, which fixes a -Wsometimes-uninitialized warning.
@@ -92,7 +92,7 @@ extern u_short ip_id; #include <stdlib.h> #if defined(_WIN32) -static inline void +static inline void __declspec(noreturn) #else static inline void __attribute__((__noreturn__)) #endif
serf: fix incorrect conditional (integer precision) in event tracing
@@ -572,7 +572,7 @@ _serf_work(u3_serf* sef_u, c3_w mil_w, u3_noun job) u3_noun u3_serf_work(u3_serf* sef_u, c3_w mil_w, u3_noun job) { - c3_t tac_t = ( u3C.wag_w & u3o_trace ); + c3_t tac_t = !!( u3C.wag_w & u3o_trace ); c3_c lab_c[2056]; u3_noun pro;
always disable networking for fake ships
@@ -849,6 +849,12 @@ _pier_disk_load_commit(u3_pier* pir_u, pir_u->lif_d = u3r_word(0, len); u3r_chubs(0, 2, pir_u->who_d, who); + // Disable networking for fake ships + // + if ( c3y == pir_u->fak_o ) { + u3_Host.ops_u.net = c3n; + } + u3z(mat); u3z(ovo); break; @@ -1455,8 +1461,8 @@ _pier_work_poke(void* vod_p, pir_u->who_d[0] = who_d[0]; pir_u->who_d[1] = who_d[1]; - /* Disable networking for fake ships - */ + // Disable networking for fake ships + // if ( c3y == pir_u->fak_o ) { u3_Host.ops_u.net = c3n; }
GA: Add python 2.7.
@@ -83,7 +83,7 @@ jobs: runs-on: windows-latest strategy: matrix: - python: [3.5, 3.6, 3.7, 3.8, 3.9] + python: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9] steps: - uses: actions/checkout@v2
syv682x: Set SYV682X HV_ILIM depend on sink path. Set syv682x HV_ILIM when source path enable. BRANCH=master TEST=Use ppc_dump <port> to check the setting correct.
@@ -297,6 +297,8 @@ static int syv682x_vbus_sink_enable(int port, int enable) /* Select Sink mode and turn on the channel */ regval &= ~(SYV682X_CONTROL_1_HV_DR | SYV682X_CONTROL_1_PWR_ENB); + /* Set sink current limit to the configured value */ + regval |= CONFIG_SYV682X_HV_ILIM << SYV682X_HV_ILIM_BIT_SHIFT; flags[port] &= ~SYV682X_FLAGS_SOURCE_ENABLED; } else { /*
disallow regular allocation from the huge reserved area
@@ -456,6 +456,7 @@ static void* mi_os_mem_alloc(size_t size, size_t try_alignment, bool commit, boo if (!commit) allow_large = false; void* p = NULL; + /* if (commit && allow_large) { p = _mi_os_try_alloc_from_huge_reserved(size, try_alignment); if (p != NULL) { @@ -463,6 +464,7 @@ static void* mi_os_mem_alloc(size_t size, size_t try_alignment, bool commit, boo return p; } } + */ #if defined(_WIN32) int flags = MEM_RESERVE;
"matrix" -> "jobs".
@@ -6,7 +6,7 @@ language: c script: ./configure --enable-debug --enable-sanitizer && make && make test -matrix: +jobs: include: # Linux-specific build stuff - os: linux @@ -23,6 +23,5 @@ matrix: notifications: email: - # TODO: Need mailing list for OpenPrinting CI builds recipients: - [email protected]
reduce slider size a bit
@@ -23,7 +23,7 @@ class GenerateSlider: self.slideroverride = tuple(self.slideroverride) self.radius = radius - self.scale = scale + self.scale = scale * 0.95 self.extended = 2 * self.radius * self.scale def convert_string(self, slider_code):
pbio/platform/essential_hub: Drop unused symbols. This sets two unused fields to NULL, and clarifies the name of the id_string.
// Special symbols for firmware compatibility with official apps typedef struct { const char *fw_ver; - const uint32_t *reserved1; - const uint8_t *reserved2; - const char *hub_type_id; + const uint32_t *checksum; + const uint8_t *reserved; + const char *id_string; } boot_t; const boot_t __attribute__((section(".boot"))) boot = { - .fw_ver = "pybricks-micropython", - .reserved1 = NULL, - .reserved2 = (const uint8_t[16]) {0}, - .hub_type_id = "LEGO Technic Small Hub(0x000D)", + // These values are not used. + .fw_ver = NULL, + .checksum = NULL, + .reserved = NULL, + // This value is checked when installing the firmware + // via the 'firmware' MicroPython module on the hub. + .id_string = "LEGO Technic Small Hub(0x000D)", }; enum {
Add SUBSYSTEM_INFORMATION_TYPE
@@ -987,6 +987,14 @@ typedef struct _THREAD_NAME_INFORMATION UNICODE_STRING ThreadName; } THREAD_NAME_INFORMATION, *PTHREAD_NAME_INFORMATION; +// private +typedef enum _SUBSYSTEM_INFORMATION_TYPE +{ + SubsystemInformationTypeWin32, + SubsystemInformationTypeWSL, + MaxSubsystemInformationType +} SUBSYSTEM_INFORMATION_TYPE; + // Processes #if (PHNT_MODE != PHNT_MODE_KERNEL) @@ -1297,6 +1305,9 @@ NtQueueApcThread( ); #if (PHNT_VERSION >= PHNT_WIN7) + +#define APC_FORCE_THREAD_SIGNAL ((HANDLE)1) // UserApcReserveHandle + NTSYSCALLAPI NTSTATUS NTAPI
out_gelf: use network api to set default host and port
@@ -302,14 +302,8 @@ static int cb_gelf_init(struct flb_output_instance *ins, struct flb_config *conf const char *tmp; struct flb_out_gelf_config *ctx = NULL; - /* Set default network configuration */ - if (!ins->host.name) { - ins->host.name = flb_strdup("127.0.0.1"); - } - if (ins->host.port == 0) { - ins->host.port = 12201; - } + flb_output_net_default("127.0.0.1", 12201, ins); /* Allocate plugin context */ ctx = flb_calloc(1, sizeof(struct flb_out_gelf_config));
mmapstorage: add keyflag test
@@ -697,6 +697,27 @@ static void test_mmap_ksLookupByName (const char * tmpFile, option_t options) } /* -- Key operation tests --------------------------------------------------------------------------------------------------------------- */ + +static void test_mmap_keyFlags (const char * tmpFile) +{ + Key * parentKey = keyNew (TEST_ROOT_KEY, KEY_VALUE, tmpFile, KEY_END); + KeySet * conf = ksNew (0, KS_END); + PLUGIN_OPEN ("mmapstorage"); + + KeySet * ks = ksNew (10, keyNew ("user/tests/mmapstorage/testKey", + KEY_FLAGS, KEY_BINARY, KEY_VALUE, "test key", KEY_END), KS_END); + succeed_if (plugin->kdbSet (plugin, ks, parentKey) == 1, "kdbSet was not successful"); + succeed_if (plugin->kdbGet (plugin, ks, parentKey) == 1, "kdbGet was not successful"); + + Key * found = ksLookupByName (ks, "user/tests/mmapstorage/testKey", 0); + succeed_if (found, "did not find key"); + succeed_if (keyIsBinary(found) == 1, "Key is not binary."); + + keyDel (parentKey); + ksDel (ks); + PLUGIN_CLOSE (); +} + /* -- Key name operation tests ---------------------------------------------------------------------------------------------------------- */ /* -- Key value operation tests --------------------------------------------------------------------------------------------------------- */ @@ -741,7 +762,7 @@ int main (int argc, char ** argv) clearStorage (tmpFile); test_mmap_ks_copy_with_meta (tmpFile); - // KeySet operation tests + // KeySet API tests clearStorage (tmpFile); test_mmap_ksDupFun (tmpFile, ksDup); @@ -784,6 +805,10 @@ int main (int argc, char ** argv) clearStorage (tmpFile); test_mmap_ksLookupByName (tmpFile, KDB_O_POP); + // Key API tests + clearStorage (tmpFile); + test_mmap_keyFlags (tmpFile); + printf ("\ntestmod_mmapstorage RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError); return nbError;
in_thermal: remove config_destroy function.
@@ -122,18 +122,6 @@ static inline int proc_temperature(struct flb_in_thermal_config *ctx, struct tem return i; } -static void config_destroy(struct flb_in_thermal_config *ctx) { -#ifdef FLB_HAVE_REGEX - if (ctx && ctx->name_regex) { - flb_regex_destroy(ctx->name_regex); - } - if (ctx && ctx->type_regex) { - flb_regex_destroy(ctx->type_regex); - } -#endif - flb_free(ctx); -} - /* Init temperature input */ static int in_thermal_init(struct flb_input_instance *in, struct flb_config *config, void *data) @@ -292,9 +280,15 @@ static int in_thermal_exit(void *data, struct flb_config *config) { (void) *config; struct flb_in_thermal_config *ctx = data; - - config_destroy(ctx); - +#ifdef FLB_HAVE_REGEX + if (ctx && ctx->name_regex) { + flb_regex_destroy(ctx->name_regex); + } + if (ctx && ctx->type_regex) { + flb_regex_destroy(ctx->type_regex); + } +#endif + flb_free(ctx); return 0; }
fix exception name Note: mandatory check (NEED_CHECK) was skipped
@@ -865,7 +865,7 @@ def test_predict_class(task_type): def test_zero_learning_rate(task_type): train_pool = Pool(TRAIN_FILE, column_description=CD_FILE) model = CatBoostClassifier(iterations=2, learning_rate=0, task_type=task_type, devices='0') - with pytest.raises(CatboostError): + with pytest.raises(CatBoostError): model.fit(train_pool)
doc: fix error in custom CSS file Typo caused some styles to be missed
position: static; border-top: none; padding: 0px; -} */ +} +*/ .rst-versions .rst-current-version { padding: 5px; @@ -81,7 +82,7 @@ table.align-center { padding: 1em 0; text-align: center; } -` + /* make .. hlist:: tables fill the page */ table.hlist { width: 95% !important;
CLEANUP: remove useless arcus_check_server_mapping() call when rejoin.
@@ -1576,16 +1576,10 @@ int arcus_zk_rejoin_ensemble() break; } - /* check zk root directory and get the serice code */ - if (zk_root == NULL) { - zk_root = "/arcus"; /* set zk root directory */ - ret = arcus_check_server_mapping(main_zk->zh, zk_root); - if (ret != 0) { - arcus_conf.logger->log(EXTENSION_LOG_WARNING, NULL, - "Failed to check server mapping for this cache node. " - "(zk_root=%s)\n", zk_root); - } - } + /* Use the zk root directory and the service code + * acquired during the execution of arcus_zk_init(). + */ + assert(zk_root != NULL && arcus_conf.svc != NULL); /* create "/cache_list/{svc}/ip:port-hostname" ephemeral znode */ ret = arcus_create_ephemeral_znode(main_zk->zh, zk_root);
Fix build with -DNETSYSCALL_DEBUG
@@ -1280,7 +1280,7 @@ sysreturn getsockopt(int sockfd, int level, int optname, void *optval, socklen_t { sock s = resolve_fd(current->p, sockfd); net_debug("sock %d, type %d, thread %ld, level %d, optname %d\n, optlen %d\n", - s->fd, s->type, current->tid, level, optname, optlen ? *optlen : -1) + s->fd, s->type, current->tid, level, optname, optlen ? *optlen : -1); union { int val;
build system: print some information about the compiler
@@ -562,27 +562,42 @@ print_flash_cmd: partition_table_get_info blank_ota_data # Check toolchain version using the output of xtensa-esp32-elf-gcc --version command. # The output normally looks as follows -# xtensa-esp32-elf-gcc (crosstool-NG crosstool-ng-1.22.0-59-ga194053) 4.8.5 +# xtensa-esp32-elf-gcc (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a) 5.2.0 # The part in brackets is extracted into TOOLCHAIN_COMMIT_DESC variable, # the part after the brackets is extracted into TOOLCHAIN_GCC_VER. ifdef CONFIG_TOOLPREFIX ifndef MAKE_RESTARTS + +TOOLCHAIN_HEADER := $(shell $(CC) --version | head -1) +TOOLCHAIN_PATH := $(shell which $(CC)) TOOLCHAIN_COMMIT_DESC := $(shell $(CC) --version | sed -E -n 's|.*\(crosstool-NG (.*)\).*|\1|gp') TOOLCHAIN_GCC_VER := $(shell $(CC) --version | sed -E -n 's|xtensa-esp32-elf-gcc.*\ \(.*\)\ (.*)|\1|gp') # Officially supported version(s) include $(IDF_PATH)/tools/toolchain_versions.mk +ifndef IS_BOOTLOADER_BUILD +$(info Toolchain path: $(TOOLCHAIN_PATH)) +endif + ifdef TOOLCHAIN_COMMIT_DESC ifneq ($(TOOLCHAIN_COMMIT_DESC), $(SUPPORTED_TOOLCHAIN_COMMIT_DESC)) $(info WARNING: Toolchain version is not supported: $(TOOLCHAIN_COMMIT_DESC)) $(info Expected to see version: $(SUPPORTED_TOOLCHAIN_COMMIT_DESC)) $(info Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.) +else +ifndef IS_BOOTLOADER_BUILD +$(info Toolchain version: $(TOOLCHAIN_COMMIT_DESC)) +endif endif ifeq (,$(findstring $(TOOLCHAIN_GCC_VER), $(SUPPORTED_TOOLCHAIN_GCC_VERSIONS))) $(info WARNING: Compiler version is not supported: $(TOOLCHAIN_GCC_VER)) $(info Expected to see version(s): $(SUPPORTED_TOOLCHAIN_GCC_VERSIONS)) $(info Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk.) +else +ifndef IS_BOOTLOADER_BUILD +$(info Compiler version: $(TOOLCHAIN_GCC_VER)) +endif endif else $(info WARNING: Failed to find Xtensa toolchain, may need to alter PATH or set one in the configuration menu)
vere: fix queu short-args parsing
@@ -1485,7 +1485,7 @@ _cw_queu(c3_i argc, c3_c* argv[]) u3_Host.dir_c = _main_pier_run(argv[0]); - while ( -1 != (ch_i=getopt_long(argc, argv, "", lop_u, &lid_i)) ) { + while ( -1 != (ch_i=getopt_long(argc, argv, "r:", lop_u, &lid_i)) ) { switch ( ch_i ) { case 6: { // no-demand u3_Host.ops_u.map = c3n;
disable modern login and pass arguments to client disables the new react ui because the browser isn't available for now and passes the additional command line arguments to the main client
@@ -21,7 +21,7 @@ cd ../ && rm -rf ./tmp/ echo "#!/bin/bash export STEAMOS=1 export STEAM_RUNTIME=1 -~/steam/bin/steam steam://open/minigameslist" > steam +~/steam/bin/steam -noreactlogin steam://open/minigameslist $@" > steam # make script executable and move chmod +x steam
gts_ls memory fault
@@ -903,7 +903,7 @@ static int read_any_gts(reader *r) unsigned long magic = 0; unsigned long start = 0x010d0d0a; unsigned long theEnd = 0x0d0d0a03; - unsigned char tmp[32]={0,}; /* Should be enough */ + unsigned char tmp[128]={0,}; /* See ECC-735 */ size_t message_size=0; size_t already_read=0; int i=0;
Re-add -a alpha error scaling based on block max alpha
@@ -654,7 +654,7 @@ astcenc_error astcenc_config_init( // // ... but we scale these up to keep a better balance between color and alpha. Note // that if the content is using alpha we'd recommend using the -a option to weight - // the color conribution by the alpha transparency. + // the color contribution by the alpha transparency. if (flags & ASTCENC_FLG_USE_PERCEPTUAL) { config.cw_r_weight = 0.30f * 2.25f; @@ -916,6 +916,18 @@ static void compress_image( if (use_full_block) { load_func(decode_mode, image, blk, bsd, x * block_x, y * block_y, z * block_z, swizzle); + + // Scale RGB error contribution by the maximum alpha in the block + // This encourages preserving alpha accuracy in regions with high + // transparency, and can buy up to 0.5 dB PSNR. + if (ctx.config.flags & ASTCENC_FLG_USE_ALPHA_WEIGHT) + { + float alpha_scale = blk.data_max.lane<3>() * (1.0f / 65535.0f); + blk.channel_weight = vfloat4(ctx.config.cw_r_weight * alpha_scale, + ctx.config.cw_g_weight * alpha_scale, + ctx.config.cw_b_weight * alpha_scale, + ctx.config.cw_a_weight); + } } // Apply alpha scale RDO - substitute constant color block else