message
stringlengths
6
474
diff
stringlengths
8
5.22k
{AH} rename helper function to prevent it from being picked up by nose, fixes
@@ -20,7 +20,7 @@ def check_import(statement): raise -def check_tests_pass(statement): +def check_pass(statement): try: output = subprocess.check_output( statement, stderr=subprocess.STDOUT, shell=True) @@ -55,7 +55,7 @@ class TestLinkWithRpath(TestLinking): package_name = "link_with_rpath" def test_package_tests_pass(self): - self.assertTrue(check_tests_pass( + self.assertTrue(check_pass( "cd {} && python test_module.py".format(os.path.join(self.workdir, "tests")))) @@ -79,7 +79,7 @@ class TestLinkWithoutRpath(TestLinking): pysam_libdirs, pysam_libs = zip(*[os.path.split(x) for x in pysam_libraries]) pysam_libdir = pysam_libdirs[0] - self.assertTrue(check_tests_pass( + self.assertTrue(check_pass( "export LD_LIBRARY_PATH={}:$PATH && cd {} && python test_module.py".format( pysam_libdir, os.path.join(self.workdir, "tests"))))
Update StatusTuple to use enum Code
@@ -23,6 +23,22 @@ namespace ebpf { class StatusTuple { public: + enum class Code { + // Not an error, indicates success. + OK = 0, + // For any error that is not covered in the existing codes. + UNKNOWN, + + INVALID_ARGUMENT, + PERMISSION_DENIED, + // For any error that was raised when making syscalls. + SYSTEM, + }; + + static StatusTuple OK() { + return StatusTuple(Code::OK, ""); + } + StatusTuple(int ret) : ret_(ret) {} StatusTuple(int ret, const char *msg) : ret_(ret), msg_(msg) {} @@ -36,16 +52,34 @@ public: msg_ = std::string(buf); } + StatusTuple(Code code, const std::string &msg) : use_enum_code_(true), code_(code), msg_(msg) {} + void append_msg(const std::string& msg) { msg_ += msg; } - int code() const { return ret_; } + bool ok() const { + if (use_enum_code_) { + return code_ == Code::OK; + } + return ret_ == 0; + } + + int code() const { + if (use_enum_code_) { + return static_cast<int>(code_); + } + return ret_; + } const std::string& msg() const { return msg_; } private: int ret_; + + bool use_enum_code_ = false; + Code code_; + std::string msg_; }; @@ -57,4 +91,21 @@ private: } \ } while (0) +namespace error { + +#define DECLARE_ERROR(FN, CODE) \ + inline StatusTuple FN(const std::string& msg) { \ + return StatusTuple(::ebpf::StatusTuple::Code::CODE, msg); \ + } \ + inline bool Is##FN(const StatusTuple& status) { \ + return status.code() == static_cast<int>(::ebpf::StatusTuple::Code::CODE); \ + } + +DECLARE_ERROR(Unknown, UNKNOWN) +DECLARE_ERROR(InvalidArgument, INVALID_ARGUMENT) +DECLARE_ERROR(PermissionDenied, PERMISSION_DENIED) +DECLARE_ERROR(System, SYSTEM) + +} // namespace error + } // namespace ebpf
ADDING FEC - now generate frames of the correct size
@@ -106,7 +106,7 @@ static __attribute__((always_inline)) size_t get_repair_payload_from_queue(picoq repair_symbol_t *rs = bff->repair_symbols_queue[bff->repair_symbols_queue_head].repair_symbol; // FIXME: temporarily ensure that the repair symbols are not split into multiple frames if (bytes_max < rs->data_length) { - PROTOOP_PRINTF(cnx, "NOT ENOUGH BYTES TO SEND SYMBOL: %u < %u", bytes_max, rs->data_length); + PROTOOP_PRINTF(cnx, "NOT ENOUGH BYTES TO SEND SYMBOL: %u < %u\n", bytes_max, rs->data_length); return 0; } size_t amount = ((rs->data_length - bff->queue_byte_offset) <= bytes_max) ? (rs->data_length - bff->queue_byte_offset) : bytes_max; @@ -189,7 +189,8 @@ static __attribute__((always_inline)) int generate_and_queue_repair_symbols(pico queue_repair_symbols(cnx, bff, bff->current_block->repair_symbols, bff->current_block->total_repair_symbols, bff->current_block); } // FIXME: choose a correct max frame size - reserve_fec_frames(cnx, bff, 1200); + + reserve_fec_frames(cnx, bff, PICOQUIC_MAX_PACKET_SIZE); return ret; }
Move alphaI to x22 to leave x18 unused (reserved on OSX)
@@ -49,7 +49,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define pCRow3 x15 #define pA x16 #define alphaR x17 -#define alphaI x18 +#define alphaI x22 #define temp x19 #define tempOffset x20 #define tempK x21
Fix NULL pointer usage * Fix NULL pointer usage I've got crash dumps from clients where that function was called with NULL automaton pointer. RogueKiller64.exe!yr_ac_automaton_destroy(YR_AC_AUTOMATON * automaton=0x0000000000000000) Ligne 814 C++ RogueKiller64.exe!yr_compiler_destroy(_YR_COMPILER * compiler=0x000001d996a999e0) Ligne 269 C++ RogueKiller64.exe!yr_compiler_create(_YR_COMPILER * * compiler=0x000001d991c6c100) Ligne 246 C++ * Fixed error code
@@ -811,6 +811,7 @@ int yr_ac_automaton_create( int yr_ac_automaton_destroy( YR_AC_AUTOMATON* automaton) { + if (automaton == NULL) return ERROR_INVALID_ARGUMENT; _yr_ac_state_destroy(automaton->root); yr_free(automaton->t_table);
[GL] Fixed the preprocessor with exponential notation
@@ -223,7 +223,7 @@ eTokenType NextToken(char **p, uToken *tok) { (*p)++; nextc=**p; } while(nextc>='0' && nextc<='9') { nb=nb*10+nextc-'0'; (*p)++; nextc=**p;} - fnb=powf(fnb, nb*expsign); + fnb *= powf(10, nb*expsign); // exp10f is a GNU extension } if(nextc=='f') { (*p)++; nextc=**p;
Fix up compiler version string searching
@@ -86,13 +86,18 @@ fi # This is not perfect by any means cc_id= compiler_vers= -if "$compiler_exe" --version | grep -q clang 2> /dev/null; then +if compiler_vers_string=$("$compiler_exe" --version 2> /dev/null); then + clang_vers_string=$(echo "$compiler_vers_string" | grep clang | head -n1) + if ! [[ -z $clang_vers_string ]]; then cc_id=clang - compiler_vers=$("$compiler_exe" -dumpversion) + # clang -dumpversion always pretends to be gcc 4.2.1 + # shellcheck disable=SC2001 + compiler_vers=$(echo "$clang_vers_string" | sed 's/.*version \([0-9]*\.[0-9]*\.[0-9]*\).*/\1/') # Only gcc has -dumpfullversion elif compiler_vers=$("$compiler_exe" -dumpfullversion 2> /dev/null); then cc_id=gcc fi +fi if [[ -z $cc_id ]]; then warn "Failed to detect compiler type"
Add comment about workgroup_pass flag in cl_device_id
@@ -413,6 +413,10 @@ struct _cl_device_id { we need to generate work-item loops to execute all the work-items in the WG, otherwise the hardware spawns the WIs. */ cl_bool spmd; + /* The Workgroup pass creates launcher functions and replaces work-item + placeholder global variables (e.g. _local_size_, _global_offset_ etc) with + loads from the context struct passed as a kernel argument. This flag + enables or disables this pass. */ cl_bool workgroup_pass; cl_device_exec_capabilities execution_capabilities; cl_command_queue_properties queue_properties;
Chronicler: Update battery device name Update battery device name to meet vender device name change BRANCH=volteer TEST=ensure battery device name correct via console command "battery"
* address, mask, and disconnect value need to be provided. */ const struct board_batt_params board_battery_info[] = { - /* NVT ATL-3S1P-606072 Battery Information */ + /* NVT CP813907-01 Battery Information */ [BATTERY_ATL_3S1P_606072] = { .fuel_gauge = { .manuf_name = "NVT", - .device_name = "ATL-3S1P-606072", + .device_name = "CP813907-01", .ship_mode = { .reg_addr = 0x00, .reg_data = { 0x10, 0x10 },
[chainmaker]modify include .h file
* See the License for the specific language governing permissions and * limitations under the License. *****************************************************************************/ -#if defined(__unix__) || defined(__unix) || defined(unix) - /* for timestamp source */ - #define _POSIX_C_SOURCE 200809L + #include <time.h> -#endif #include "boatconfig.h" #include "boatiotsdk.h"
Support for ecbuild v3.4: Fix export in bundles
@@ -450,4 +450,7 @@ ecbuild_add_library( TARGET eccodes eccodes.h eccodes_windef.h ${CMAKE_CURRENT_BINARY_DIR}/eccodes_version.h - ${PROJECT_BINARY_DIR}/eccodes_config.h ) + ${PROJECT_BINARY_DIR}/eccodes_config.h + PUBLIC_INCLUDES + $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/src> + $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src> )
No need of initdb sanity check in pg_rewind Master pg_rewind does not use 'initdb -S' to fsync the target data directory anymore.
@@ -39,7 +39,6 @@ static void createBackupLabel(XLogRecPtr startpoint, TimeLineID starttli, static void digestControlFile(ControlFileData *ControlFile, char *source, size_t size); -static void greenplum_pre_syncTargetDirectory_SanityCheck(const char *argv0); static void syncTargetDirectory(void); static void sanityChecks(void); static void findCommonAncestorTimeline(XLogRecPtr *recptr, int *tliIndex); @@ -462,7 +461,6 @@ main(int argc, char **argv) if (showprogress) pg_log_info("syncing target data directory"); - greenplum_pre_syncTargetDirectory_SanityCheck(argv[0]); syncTargetDirectory(); if (writerecoveryconf) @@ -806,36 +804,6 @@ digestControlFile(ControlFileData *ControlFile, char *src, size_t size) checkControlFile(ControlFile); } -static void -greenplum_pre_syncTargetDirectory_SanityCheck(const char *argv0) -{ - int ret; -#define MAXCMDLEN (2 * MAXPGPATH) - char exec_path[MAXPGPATH]; - - /* locate initdb binary */ - if ((ret = find_other_exec(argv0, "initdb", - "initdb (Greenplum Database) " PG_VERSION "\n", - exec_path)) < 0) - { - char full_path[MAXPGPATH]; - - if (find_my_exec(argv0, full_path) < 0) - strlcpy(full_path, progname, sizeof(full_path)); - - if (ret == -1) - pg_fatal("The program \"initdb\" is needed by %s but was\n" - "not found in the same directory as \"%s\".\n" - "Check your installation.\n", progname, full_path); - else - pg_fatal("The program \"initdb\" was found by \"%s\"\n" - "but was not the same version as %s.\n" - "Check your installation.\n", full_path, progname); - } - - /* All good */ -} - /* * Sync target data directory to ensure that modifications are safely on disk. *
SDL_GetError returns an empty string, not nil, when there are no errors.
@@ -23,7 +23,11 @@ func (ec ErrorCode) c() C.SDL_errorcode { // GetError (https://wiki.libsdl.org/SDL_GetError) func GetError() error { if err := C.SDL_GetError(); err != nil { - return errors.New(C.GoString(err)) + gostr := C.GoString(err) + // SDL_GetError returns "an empty string if there hasn't been an error message" + if len(gostr) > 0 { + return errors.New(gostr) + } } return nil }
tests: Test memory efficient basis approach
@@ -220,6 +220,24 @@ tests/test-pics-basis-noncart: traj scale phantom delta fmac ones repmat pics nu rm *.ra ; cd .. ; rmdir $(TESTS_TMP) touch $@ +tests/test-pics-basis-noncart-memory: traj scale phantom delta fmac ones repmat pics nufft nrmse + set -e; mkdir $(TESTS_TMP) ; cd $(TESTS_TMP) ;\ + $(TOOLDIR)/traj -r -x256 -D -y31 traj.ra ;\ + $(TOOLDIR)/scale 0.5 traj.ra traj2.ra ;\ + $(TOOLDIR)/phantom -t traj2.ra ksp.ra ;\ + $(TOOLDIR)/ones 6 1 1 1 1 1 31 o.ra ;\ + $(TOOLDIR)/scale 0.5 o.ra o1.ra ;\ + $(TOOLDIR)/join 6 o.ra o1.ra o2.ra ;\ + $(TOOLDIR)/ones 3 128 128 1 coils.ra ;\ + $(TOOLDIR)/transpose 2 5 traj2.ra traj3.ra ;\ + $(TOOLDIR)/transpose 2 5 ksp.ra ksp1.ra ;\ + $(TOOLDIR)/pics -S -r0.001 -t traj3.ra -Bo2.ra ksp1.ra coils.ra reco1.ra ;\ + $(TOOLDIR)/pics -S -r0.001 -t traj2.ra ksp.ra coils.ra reco.ra ;\ + $(TOOLDIR)/scale 2.5 reco1.ra reco2.ra ;\ + $(TOOLDIR)/slice 6 0 reco2.ra reco20.ra ;\ + $(TOOLDIR)/nrmse -t 0.002 reco.ra reco20.ra ;\ + rm *.ra ; cd .. ; rmdir $(TESTS_TMP) + touch $@ @@ -230,6 +248,6 @@ TESTS += tests/test-pics-wavl1 tests/test-pics-poisson-wavl1 tests/test-pics-joi TESTS += tests/test-pics-weights tests/test-pics-noncart-weights TESTS += tests/test-pics-warmstart tests/test-pics-batch TESTS += tests/test-pics-tedim tests/test-pics-bp-noncart -TESTS += tests/test-pics-basis tests/test-pics-basis-noncart +TESTS += tests/test-pics-basis tests/test-pics-basis-noncart tests/test-pics-basis-noncart-memory
bootloader_mode defines only needs to be known by the bootloader
/******************************************************************************* * Definitions ******************************************************************************/ +#define BOOTLOADER_MODE 0x00 +#define APPLICATION_MODE 0x01 #define BOOTLOADER_RCV_COMMAND 0x01 #define BOOTLOADER_SND_COMMAND 0x10
OcMachoLib: Add missing ASSERTs to the Context init function.
@@ -42,6 +42,10 @@ MachoInitializeContext ( UINTN Index; CONST MACH_LOAD_COMMAND *Command; UINTN CommandsSize; + + ASSERT (MachHeader != NULL); + ASSERT (FileSize > 0); + ASSERT (Context != NULL); // // Verify MACH-O Header sanity. //
Update the macOS Makefile
@@ -19,7 +19,7 @@ TEST_LD_FLAGS=-Lcontrib/cmocka/build/src -lcmocka -ldl .PHONY: all clean test all: libscope.so -libscope.so: src/wrap.c os/$(OS)/os.c src/cfgutils.c src/cfg.c src/transport.c src/log.c src/out.c src/circbuf.c src/evt.c src/ctl.c src/format.c src/dbg.c $(YAML_SRC) contrib/cJSON/cJSON.c +libscope.so: src/wrap.c os/$(OS)/os.c src/cfgutils.c src/cfg.c src/transport.c src/log.c src/out.c src/circbuf.c src/evt.c src/ctl.c src/format.c src/com.c src/dbg.c $(YAML_SRC) contrib/cJSON/cJSON.c @echo "Building libscope.so ..." $(CC) $(CFLAGS) -shared -fvisibility=hidden -DSCOPE_VER=\"$(SCOPE_VER)\" $(YAML_DEFINES) -o ./lib/$(OS)/$@ $(INCLUDES) $^ -e,prog_version $(LD_FLAGS) $(CC) -c $(CFLAGS) -DSCOPE_VER=\"$(SCOPE_VER)\" $(YAML_DEFINES) $(INCLUDES) $^
cache: add dependencies only if plugin is built
@@ -5,18 +5,25 @@ if (DEPENDENCY_PHASE) plugin_check_if_included ("resolver") if (NOT_INCLUDED) remove_plugin (cache "resolver plugin not found (${NOT_INCLUDED})") + return () endif (NOT_INCLUDED) plugin_check_if_included ("mmapstorage") if (NOT_INCLUDED) remove_plugin (cache "mmapstorage plugin not found (${NOT_INCLUDED})") + return () endif (NOT_INCLUDED) add_definitions (-D_GNU_SOURCE -D_DARWIN_C_SOURCE) safe_check_symbol_exists (nftw "ftw.h" HAVE_NFTW) if (NOT HAVE_NFTW) remove_plugin (cache "nftw (ftw.h) not found") + return () endif (NOT HAVE_NFTW) + + if (BUILD_SHARED) + add_dependencies (elektra-cache elektra-resolver_fm_hpu_b elektra-mmapstorage) + endif () endif () add_plugin (cache
fix bug in librarypath directory for attach
@@ -58,6 +58,11 @@ func (rc *Config) Attach(args []string) { // Directory contains scope.yml which is configured to output to that // directory and has a command directory configured in that directory. env := os.Environ() + if !rc.Passthrough { + rc.setupWorkDir(args, true) + env = append(env, "SCOPE_CONF_PATH="+filepath.Join(rc.WorkDir, "scope.yml")) + log.Info().Bool("passthrough", rc.Passthrough).Strs("args", args).Msg("calling syscall.Exec") + } if len(rc.LibraryPath) > 0 { // Validate path exists if !util.CheckDirExists(rc.LibraryPath) { @@ -66,11 +71,6 @@ func (rc *Config) Attach(args []string) { // Prepend "-f" [PATH] to args args = append([]string{"-f", rc.LibraryPath}, args...) } - if !rc.Passthrough { - rc.setupWorkDir(args, true) - env = append(env, "SCOPE_CONF_PATH="+filepath.Join(rc.WorkDir, "scope.yml")) - log.Info().Bool("passthrough", rc.Passthrough).Strs("args", args).Msg("calling syscall.Exec") - } // Prepend "--attach" to args args = append([]string{"--attach"}, args...) if !rc.Subprocess {
component/bt: Update BLE private address after it's private address interval
@@ -65,6 +65,23 @@ static void btm_gen_resolve_paddr_cmpl(tSMP_ENC *p) p_cb->set_local_privacy_cback = NULL; } + if (btm_cb.ble_ctr_cb.inq_var.adv_mode == BTM_BLE_ADV_ENABLE){ + BTM_TRACE_DEBUG("Advertise with new resolvable private address, now."); + /** + * Restart advertising, using new resolvable private address + */ + btm_ble_stop_adv(); + btm_ble_start_adv(); + } + if (btm_cb.ble_ctr_cb.inq_var.state == BTM_BLE_SCANNING){ + BTM_TRACE_DEBUG("Scan with new resolvable private address, now."); + /** + * Restart scaning, using new resolvable private address + */ + btm_ble_stop_scan(); + btm_ble_start_scan(); + } + /* start a periodical timer to refresh random addr */ btu_stop_timer_oneshot(&p_cb->raddr_timer_ent); #if (BTM_BLE_CONFORMANCE_TESTING == TRUE)
Fix toolbar regression updating from 2.39 to 3.0
#define PLUGIN_NAME TOOLSTATUS_PLUGIN_NAME #define SETTING_NAME_TOOLSTATUS_CONFIG (PLUGIN_NAME L".Config") #define SETTING_NAME_REBAR_CONFIG (PLUGIN_NAME L".RebarConfig") -#define SETTING_NAME_TOOLBAR_CONFIG (PLUGIN_NAME L".ToolbarConfig") +#define SETTING_NAME_TOOLBAR_CONFIG (PLUGIN_NAME L".ToolbarButtonConfig") #define SETTING_NAME_STATUSBAR_CONFIG (PLUGIN_NAME L".StatusbarConfig") #define SETTING_NAME_TOOLBAR_THEME (PLUGIN_NAME L".ToolbarTheme") #define SETTING_NAME_TOOLBARDISPLAYSTYLE (PLUGIN_NAME L".ToolbarDisplayStyle")
zephyr: lazor: Enable the ps8xxx override function This function is needed to detect the correct product ID for each port. Add it. BRANCH=none TEST=Build lazor on zephyr; no obvious changes when run
#include "config.h" #include "console.h" #include "driver/ln9310.h" +#include "tcpm/ps8xxx_public.h" #include "gpio.h" #include "hooks.h" #include "system.h" @@ -69,9 +70,6 @@ int board_is_clamshell(void) return get_model() == LIMOZEEN; } -/* TODO(b:183118990): enable PS8xxx driver for zephyr */ -#ifndef CONFIG_ZEPHYR -#include "driver/tcpm/ps8xxx.h" __override uint16_t board_get_ps8xxx_product_id(int port) { /* @@ -85,4 +83,3 @@ __override uint16_t board_get_ps8xxx_product_id(int port) return PS8805_PRODUCT_ID; } -#endif
Change cast for intpool to int64_t The internal int type was changed to int64_t this cast to int was missed. Error found using the Android compiler.
@@ -175,7 +175,7 @@ _oc_mmem_free( break; case INT_POOL: memmove(m->ptr, m->next->ptr, - &ints[OC_INTS_POOL_SIZE - avail_ints] - (int *)m->next->ptr); + &ints[OC_INTS_POOL_SIZE - avail_ints] - (int64_t *)m->next->ptr); break; case DOUBLE_POOL: memmove(m->ptr, m->next->ptr,
Add PhGetProcessPeb
@@ -176,6 +176,29 @@ PhGetProcessPeb32( return status; } +FORCEINLINE +NTSTATUS +PhGetProcessPeb( + _In_ HANDLE ProcessHandle, + _Out_ PVOID* PebBaseAddress + ) +{ + NTSTATUS status; + PROCESS_BASIC_INFORMATION basicInfo; + + status = PhGetProcessBasicInformation( + ProcessHandle, + &basicInfo + ); + + if (NT_SUCCESS(status)) + { + *PebBaseAddress = (PVOID)basicInfo.PebBaseAddress; + } + + return status; +} + /** * Gets a handle to a process' debug object. *
Update README.md Corrections and minor changes.
@@ -3,7 +3,7 @@ GoAccess [![Build Status](https://travis-ci.org/allinurl/goaccess.svg?branch=mas ## What is it? ## GoAccess is an open source *real-time web log analyzer* and interactive viewer -that **runs in a *terminal* in *nix systems or through your *browser*. It +that *runs in a terminal* on *nix systems or through your *browser*. It provides fast and valuable HTTP statistics for system administrators that require a visual server report on the fly. More info at: [http://goaccess.io](http://goaccess.io/?src=gh). @@ -112,8 +112,8 @@ Download, extract and compile GoAccess with: ### Distributions ### It is easiest to install GoAccess on Linux using the preferred package manager -of your Linux distribution. Please _note_ that not all distributions will have -the lastest version of GoAccess available +of your Linux distribution. Please note that not all distributions will have +the lastest version of GoAccess available. #### Debian/Ubuntu #### @@ -343,7 +343,7 @@ It's even possible to parse files from a pipe while reading regular files: # cat access.log.2 | goaccess access.log access.log.1 - -**Note** that the single dash is appended to the command line to let GoAccess +**Note**: the single dash is appended to the command line to let GoAccess know that it should read from the pipe. Now if we want to add more flexibility to GoAccess, we can do a series of @@ -352,7 +352,7 @@ access.log.*.gz in addition to the current log file, we can do: # zcat access.log.*.gz | goaccess access.log - -**Note**: On Mac OS X, use `gunzip -c` instead of `zcat`. +_Note_: On Mac OS X, use `gunzip -c` instead of `zcat`. #### REAL TIME HTML OUTPUT #### @@ -366,7 +366,7 @@ it real-time. # goaccess access.log -o /usr/share/nginx/html/your_site/report.html --real-time-html -To view the report you can navigate to `http://your_site/report.html` (see [#440](https://github.com/allinurl/goaccess/issues/440#issuecomment-226644428) for more details). +To view the report you can navigate to `http://your_site/report.html`. By default, GoAccess will use the host name of the generated report. Optionally, you can specify the URL to which the client's browser will connect @@ -447,7 +447,7 @@ priority, we can run it as: # nice -n 19 goaccess -f access.log -a and if you don't want to install it on your server, you can still run it from -your local machine: +your local machine! # ssh root@server 'cat /var/log/apache2/access.log' | goaccess -a -
Implement the usage of usbd_edpt_ISO_xfer()
* * */ +// TODO: Rename CFG_TUD_AUDIO_EPSIZE_IN to CFG_TUD_AUDIO_EP_IN_BUFFER_SIZE + #include "tusb_option.h" #if (TUSB_OPT_DEVICE_ENABLED && CFG_TUD_AUDIO) @@ -129,6 +131,7 @@ typedef struct #if CFG_TUD_AUDIO_EPSIZE_IN CFG_TUSB_MEM_ALIGN uint8_t epin_buf[CFG_TUD_AUDIO_EPSIZE_IN]; // Bigger makes no sense for isochronous EP's (but technically possible here) + tu_fifo_t epin_ff; #endif #if CFG_TUD_AUDIO_INT_CTR_EPSIZE_IN @@ -531,7 +534,14 @@ static bool audiod_tx_done_cb(uint8_t rhport, audiod_interface_t* audio, uint16_ // THIS FUNCTION IS NOT EXECUTED WITHIN AN INTERRUPT SO IT DOES NOT INTERRUPT tud_audio_n_write_ep_in_buffer()! AS LONG AS tud_audio_n_write_ep_in_buffer() IS NOT EXECUTED WITHIN AN INTERRUPT ALL IS FINE! // Schedule transmit - TU_VERIFY(usbd_edpt_xfer(rhport, audio->ep_in, audio->epin_buf, audio->epin_buf_cnt)); + // TU_VERIFY(usbd_edpt_xfer(rhport, audio->ep_in, audio->epin_buf, audio->epin_buf_cnt)); + + + TU_VERIFY(usbd_edpt_ISO_xfer(rhport, audio->ep_in, &audio->epin_ff)); + + + + // Inform how many bytes were copied *n_bytes_copied = audio->epin_buf_cnt; @@ -631,7 +641,9 @@ static bool audiod_tx_done_type_I_pcm_ff_cb(uint8_t rhport, audiod_interface_t* return true; } - nByteCount = tu_fifo_read_n(&audio->tx_ff[0], audio->epin_buf, nByteCount); + nByteCount = tu_fifo_read_n_into_other_fifo(&audio->tx_ff[0], &audio->epin_ff, 0, nByteCount); +// nByteCount = tu_fifo_read_n(&audio->tx_ff[0], audio->epin_buf, nByteCount); + audio->epin_buf_cnt = nByteCount; return true; @@ -735,6 +747,10 @@ void audiod_init(void) tu_fifo_config_mutex(&audio->tx_ff[cnt], osal_mutex_create(&audio->tx_ff_mutex[cnt])); #endif } + + // Initialize IN EP FIFO + tu_fifo_config(&audio->epin_ff, &audio->epin_buf, CFG_TUD_AUDIO_EPSIZE_IN, 1, true); + #endif #if CFG_TUD_AUDIO_EPSIZE_OUT && CFG_TUD_AUDIO_RX_FIFO_SIZE @@ -765,6 +781,10 @@ void audiod_reset(uint8_t rhport) audiod_interface_t* audio = &_audiod_itf[i]; tu_memclr(audio, ITF_MEM_RESET_SIZE); +#if CFG_TUD_AUDIO_EPSIZE_IN + tu_fifo_clear(&audio->epin_ff); +#endif + #if CFG_TUD_AUDIO_EPSIZE_IN && CFG_TUD_AUDIO_TX_FIFO_SIZE for (uint8_t cnt = 0; cnt < CFG_TUD_AUDIO_TX_FIFO_COUNT; cnt++) {
Update tests_to_skip.txt
@@ -8,10 +8,14 @@ Lines can be commented out using # Slice copying not implemented yet %test-bit2=test + %test-bit2=psa Arithmetic operations are only supported on int<8>, int<16> and int<32>. %test-arith-nonbyte=test + %test-arith-nonbyte=psa Header unions are not supported %test-header-union-1=test + %test-header-union-1=psa %test-header-union-2=test + %test-header-union-2=psa
fix name of external_pull_request_event
@@ -220,7 +220,7 @@ installer: rules: - if: $CI_PIPELINE_SOURCE != "push" && $CI_PIPELINE_SOURCE != "web" when: never - - if: $CI_PIPELINE_SOURCE == "external_pull_request" + - if: $CI_PIPELINE_SOURCE == "external_pull_request_event" variables: TRIGGER_BRANCH: main - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
Clarify the EBNF description.
@@ -68,11 +68,12 @@ TABLE OF CONTENTS: Whitespace and comments are implicitly stripped out before parsing. - To put it in words, /regex/ defines a regular expression that would - match a single token in the input. "quoted" would match a single - string. <english description> contains an informal description of what - characters would match. In the case of ambiguity, longest match wins. - In the case of ambiguity with a quoted string, the quoted string wins. + To put the description in words, /regex/ defines a regular + expression that would match a single token in the input. "quoted" + would match a single string. <english description> contains an + informal description of what characters would match. In the case of + ambiguity, longest match wins. In the case of ambiguity with a + quoted string, the quoted string wins. Productions are defined by any number of expressions, in which expressions are '|' separated sequences of terms.
add new mygpu -d option and change default to gfx900
@@ -239,10 +239,10 @@ TARGET_TRIPLE=${TARGET_TRIPLE:-amdgcn-amd-amdhsa} CUDA_PATH=${CUDA_PATH:-/usr/local/cuda} ATMI_PATH=${ATMI_PATH:-/opt/rocm/aomp} -# Determine which gfx processor to use, default to Fiji (gfx803) +# Determine which gfx processor to use, default to Vega (gfx900) if [ ! $LC_MCPU ] ; then # Use the mygpu in pair with this script, no the pre-installed one. - LC_MCPU=`$cdir/mygpu` + LC_MCPU=`$cdir/mygpu -d gfx900` if [ "$LC_MCPU" == "" ] ; then LC_MCPU="gfx803" fi
Fix reference to symbol 'main'. The AIX binder needs to be instructed that the output will have no entry point (see AIX' ld manual: -e in the Flags section; autoexp and noentry in the Binder section).
@@ -1098,7 +1098,7 @@ my %targets = ( dso_scheme => "dlfcn", shared_target => "aix", module_ldflags => "-Wl,-G,-bsymbolic,-bexpall", - shared_ldflag => "-Wl,-G,-bsymbolic", + shared_ldflag => "-Wl,-G,-bsymbolic,-bnoentry", shared_defflag => "-Wl,-bE:", perl_platform => 'AIX', },
Fix get_tag and get_tags type hints
@@ -144,22 +144,28 @@ class AlignedSegment: ) -> None: ... def has_tag(self, tag: str) -> bool: ... @overload - def get_tag(self, tag: str, with_value_type: Literal[False]) -> TagValue: ... + def get_tag(self, tag: str, with_value_type: Literal[False] = ...) -> TagValue: ... @overload - def get_tag(self, tag, with_value_type: Literal[True]) -> Tuple[TagValue, str]: ... + def get_tag( + self, tag: str, with_value_type: Literal[True] + ) -> Tuple[TagValue, str]: ... @overload def get_tag( - self, tag, with_value_type: bool = ... + self, tag: str, with_value_type: bool ) -> Union[TagValue, Tuple[TagValue, str]]: ... @overload def get_tags( - self, with_value_type: Literal[False] + self, with_value_type: Literal[False] = ... ) -> List[Tuple[str, TagValue]]: ... @overload def get_tags( self, with_value_type: Literal[True] ) -> List[Tuple[str, TagValue, str]]: ... @overload + def get_tags( + self, with_value_type: bool + ) -> Union[List[Tuple[str, TagValue]], List[Tuple[str, TagValue, str]]]: ... + @overload def get_tags( self, with_value_type: bool = ... ) -> Union[List[Tuple[str, TagValue, str]], List[Tuple[str, TagValue]]]: ...
make sure secondary CPU's stack is aligned with CPU STACK secondary CPU's stack should be aligned with 16
@@ -45,6 +45,7 @@ void write_trampoline_stack_sym(uint16_t pcpu_id) hva = (uint64_t *)(hpa2hva(trampoline_start16_paddr) + trampoline_relo_addr(secondary_cpu_stack)); stack_sym_addr = (uint64_t)&per_cpu(stack, pcpu_id)[CONFIG_STACK_SIZE - 1]; + stack_sym_addr &= ~(CPU_STACK_ALIGN - 1UL); *hva = stack_sym_addr; clflush(hva);
Check HAPI_ParmInfo.typeInfoSH is not null before querying
@@ -298,12 +298,15 @@ configureStringAttribute( { tAttr.setUsedAsFilename(true); + if(parm.typeInfoSH) + { MString filterString = Util::HAPIString(parm.typeInfoSH); if(filterString.length()) { filterString = filterString + "(" + filterString + ")"; tAttr.addToCategory("hapiParmFile_filter" + filterString); } + } switch(parm.permissions) {
ci: add missing test script for arm & aarch64
@@ -39,6 +39,7 @@ Alpine (gcc,arm)_task: CIRRUS_SHELL: /sbin/qemu-sh setup_script: *alpine-deps <<: *pipeline + test_script: ninja -C build test Alpine (gcc,aarch64)_task: container: @@ -47,6 +48,7 @@ Alpine (gcc,aarch64)_task: CIRRUS_SHELL: /sbin/qemu-sh setup_script: *alpine-deps <<: *pipeline + test_script: ninja -C build test MacOS_task: macos_instance:
CI/mqtt: Execute mqtt weekend tests from test apps
@@ -51,15 +51,15 @@ variables: test_weekend_mqtt: extends: - - .example_test_template + - .test_app_esp32_template - .rules:labels:weekend_test tags: - ESP32 - Example_WIFI variables: - ENV_FILE: "$CI_PROJECT_DIR/components/mqtt/weekend_test/env.yml" - TEST_CASE_PATH: "$CI_PROJECT_DIR/components/mqtt/weekend_test" - CONFIG_FILE_PATH: "$CI_PROJECT_DIR/components/mqtt/weekend_test" + ENV_FILE: "$CI_PROJECT_DIR/tools/test_apps/protocols/mqtt/publish_connect_test/env.yml" + TEST_CASE_PATH: "$CI_PROJECT_DIR/tools/test_apps/protocols/mqtt/publish_connect_test" + CONFIG_FILE_PATH: "$CI_PROJECT_DIR/tools/test_apps/protocols/mqtt/publish_connect_test" test_weekend_network: extends:
attempt at travis
@@ -38,7 +38,13 @@ before_install: - popd - sudo ldconfig -script: ./autogen.sh && export CC=mpicc && ./configure && make && make test +script: + - mkdir build && cd build + - cmake ../ + - make + - make test + +#script: ./autogen.sh && export CC=mpicc && ./configure && make && make test #script: ./autogen.sh && ./configure && make && make test compiler:
bin: on '-J', print all JSON config schema
@@ -75,8 +75,6 @@ struct flb_stacktrace flb_st; #define FLB_HELP_TEXT 0 #define FLB_HELP_JSON 1 -/* JSON Helper version: current '1' */ -#define FLB_HELP_VERSION 1 #define PLUGIN_CUSTOM 0 #define PLUGIN_INPUT 1 @@ -896,6 +894,7 @@ int flb_main(int argc, char **argv) { int opt; int ret; + flb_sds_t json; /* handle plugin properties: -1 = none, 0 = input, 1 = output */ int last_plugin = -1; @@ -1082,7 +1081,14 @@ int flb_main(int argc, char **argv) break; case 'J': if (last_plugin == -1) { - flb_help(EXIT_SUCCESS, config); + json = flb_help_build_json_schema(config); + if (!json) { + exit(EXIT_FAILURE); + } + + printf("%s\n", json); + flb_sds_destroy(json); + exit(0); } else { flb_help_plugin(EXIT_SUCCESS, FLB_HELP_JSON, config,
SetupTool: Fix update crash
@@ -149,7 +149,7 @@ BOOLEAN SetupExtractBuild( fileName = PhConvertUtf8ToUtf16(zipFileStat.m_filename); if ((index = PhFindStringInString(fileName, 0, L"x64\\")) != -1) - PhMoveReference(&fileName, PhSubstring(fileName, index, fileName->Length - index)); + PhMoveReference(&fileName, PhSubstring(fileName, index, (fileName->Length / 2) - index)); } else { @@ -158,7 +158,7 @@ BOOLEAN SetupExtractBuild( fileName = PhConvertUtf8ToUtf16(zipFileStat.m_filename); if ((index = PhFindStringInString(fileName, 0, L"x32\\")) != -1) - PhMoveReference(&fileName, PhSubstring(fileName, index, fileName->Length - index)); + PhMoveReference(&fileName, PhSubstring(fileName, index, (fileName->Length / 2) - index)); } extractPath = PhConcatStrings(3, PhGetString(SetupInstallPath), L"\\", PhGetString(fileName));
Fix RunAsAdmin starting with low priority
@@ -2460,7 +2460,7 @@ HRESULT PhCreateAdminTask( ITaskSettings_put_DisallowStartIfOnBatteries(taskSettings, VARIANT_FALSE); ITaskSettings_put_StopIfGoingOnBatteries(taskSettings, VARIANT_FALSE); ITaskSettings_put_ExecutionTimeLimit(taskSettings, taskTimeLimitString); - //ITaskSettings_put_Priority(taskSettings, 1); + ITaskSettings_put_Priority(taskSettings, 1); if (SUCCEEDED(ITaskSettings_QueryInterface( taskSettings,
doc: add release notes as discussed in
@@ -91,6 +91,7 @@ We added even more functionality, which could not make it to the highlights: ## Other News +- We added a tutorial about securing the integrity and confidentiality of configuration values. - Peter Nirschl finished his [thesis](https://www.libelektra.org/ftp/elektra/publications/nirschl2018cryptographic.pdf) ([signature](https://www.libelektra.org/ftp/elektra/publications/nirschl2018cryptographic.pdf.sig)). It includes a benchmark of different cryptographic providers.
Remove duplicate test in pull_request.yml
@@ -5,21 +5,6 @@ on: types: [labeled] jobs: - basic-test: - runs-on: self-hosted - - if: contains(github.event.pull_request.labels.*.name, 'safe to test') - steps: - - uses: actions/checkout@v2 - with: - ref: ${{github.event.pull_request.head.ref}} - repository: ${{github.event.pull_request.head.repo.full_name}} - - name: configure - run: ./autogen.sh && ./configure --enable-werror || (cat config.log && false) - - name: make - run: make -j - - name: Run tests - run: export PATH="/home/docker/bin:${PATH}" && make check -j VERBOSE=1 basic-test: runs-on: self-hosted
Fixup README.md Fixed build instructions, added maintainers, other small fixes
The Dagger (XDAG) cryptocurrency ================================ -- Community site: https://xdag.io - Developer's site: http://xdag.me -- Main net is launched January 5, 2018 at 22:45 GMT. +- Community site: https://xdag.io - Developer's site: http://xdag.me (now offline) +- The Main net was launched January 5, 2018 at 22:45 GMT. Principles: @@ -30,17 +30,17 @@ Install and run (Linux): - Make: - $ cd xdag/cheatcoin + $ cd xdag/client $ make - Run, for example, the miner with 2 CPU mining threads, in daemon mode, connected to the pool xdag.me:13654 - $ ./xdag -m 2 -d xdag.me:13654 + $ ./xdag -m 2 -d put.xdag.server.here:13654 Enter random characters: [enter] - Run terminal connected to the daemon in the same folder: - $ xdag -i + $ ./xdag -i xdag> help [see help] @@ -89,6 +89,7 @@ Double spending is prohibited because only first concurrent transaction (by this Structure of block: ------------------ +_The on-disk format will change in the future. Consider this the network protocol._ Each block has fixed size 512 bytes. Block consists of 16 fields each of whish has length 32 bytes. Field 0 is header, it consists of 4 quadwords: @@ -114,17 +115,12 @@ Transport layer: --------------- The dnet network is used as transport layer. +_A new transport layer will come in the future._ -Updates: +Maintainers: --------------- -Replacement SHA256 transform code from openssl project, -modified by true ( XDAG rvKaJSbP9DE6sg6XetYtSpaK+2aDbUq8 ) +jonano614 ( gKNRtSL1pUaTpzMuPMznKw49ILtP6qX3 ) -- 50-150% speedup on Intel Core series post-Nehalem -- 50-100% speedup on AMD Heavy Equipment cores -- 400-500% speedup on Ryzen -- Better use of threads than reference implementation - -Heat output is increased with the fast version, so you may want to continue using the old implementation on devices with poor cooling (notebooks, etc). +true ( rvKaJSbP9DE6sg6XetYtSpaK+2aDbUq8 )
Added early flood check
@@ -199,6 +199,10 @@ namespace MiningCore.Stratum if (buffer.Count == 0 || !isAlive) return; + // prevent flooding + if (buffer.Count > MaxRequestLength) + throw new InvalidDataException($"[{ConnectionId}] Incoming request size exceeds maximum of {MaxRequestLength}"); + var bufferSize = buffer.Count; var remaining = bufferSize; var buf = ByteArrayPool.Rent(bufferSize); @@ -283,7 +287,7 @@ namespace MiningCore.Stratum // prevent flooding if (recvQueue.Sum(x => x.Size) > MaxRequestLength) - throw new InvalidDataException($"[{ConnectionId}] Incoming message exceeds maximum length of {MaxRequestLength}"); + throw new InvalidDataException($"[{ConnectionId}] Incoming request size exceeds maximum of {MaxRequestLength}"); break; }
CoreValidation: Added post run step hook to store test results.
@@ -4,6 +4,7 @@ import os import shutil import sys +from datetime import datetime from buildutils.builder import Device, Compiler, Axis, Step, BuildStep, RunModelStep, Builder, Filter TARGET_FVP = 'FVP' @@ -31,8 +32,8 @@ FVP_MODELS = { Device.CA9NEON : { 'cmd': "fvp_ve_cortex-a9x1.exe", 'args': { 'limit': "100000000", 'config': "config/ARMCA9neon_config.txt" } } } -def format(str, dev, cc, target = "FVP"): - return str.format(dev = dev.value[0], cc = cc.value, target = target) +def format(str, dev, cc, target = "FVP", **kwargs): + return str.format(dev = dev.value[0], cc = cc.value, target = target, **kwargs) def testProject(dev, cc, target): rtebuild = format("{dev}/{cc}/default.rtebuild", dev = dev, cc = cc, target=target) @@ -120,6 +121,10 @@ def images(step, config): return images +def storeResult(step, config, cmd): + result = format("{dev}/{cc}/result_{target}_{now}.xml", config['device'], config['compiler'], config['target'], now = datetime.now().strftime("%Y%m%d%H%M%S")) + step.storeResult(cmd, result) + def create(): deviceAxis = Axis("device", abbrev="d", values=Device, desc="Device(s) to be considered.") compilerAxis = Axis("compiler", abbrev="c", values=Compiler, desc="Compiler(s) to be considered.") @@ -132,6 +137,7 @@ def create(): runStep = RunModelStep("run", abbrev="r", desc="Run the selected configurations.") runStep.images = images runStep.model = lambda step, config: FVP_MODELS[config['device']] + runStep.post = storeResult filterAC5 = Filter().addAxis(compilerAxis, Compiler.AC5).addAxis(deviceAxis, "CM[23]3*") filterAC6LTM = Filter().addAxis(compilerAxis, Compiler.AC6LTM).addAxis(deviceAxis, "CM[23]3*").addAxis(deviceAxis, "CM0*")
fix Cooperlake not selectable via environment variable
@@ -1018,7 +1018,7 @@ static gotoblas_t *force_coretype(char *coretype){ char message[128]; //char mname[20]; - for ( i=1 ; i <= 24; i++) + for ( i=1 ; i <= 25; i++) { if (!strncasecmp(coretype,corename[i],20)) {
fix formatting release notes
@@ -117,6 +117,7 @@ you up to date with the multi-language support provided by Elektra. _(Michael Tucek)_ ### FUSE Binding + - Added check for existence of accessed path before opening new file descriptor _(@lawli3t)_ ### <<Binding3>>
include/charge_state_v2.h: Format with clang-format BRANCH=none TEST=none
@@ -117,8 +117,8 @@ void board_base_reset(void); * @param curr Pointer to struct charge_state_data * @return Action to take. */ -enum critical_shutdown board_critical_shutdown_check( - struct charge_state_data *curr); +enum critical_shutdown +board_critical_shutdown_check(struct charge_state_data *curr); /** * Callback to set battery level for shutdown
avoid compiler warning on negative unsigned int comparison
@@ -297,7 +297,7 @@ static apr_byte_t oidc_cache_redis_get(request_rec *r, const char *section, } /* do a sanity check on the returned value */ - if ((reply->len < 0) || (reply->str == NULL) + if ((reply->str == NULL) || (reply->len != strlen(reply->str))) { oidc_error(r, "redisCommand reply->len (%d) != strlen(reply->str): '%s'",
Remove class E from martian_filter. Thanks to Dave Taht.
@@ -439,6 +439,7 @@ wait_for_fd(int direction, int fd, int msecs) int martian_prefix(const unsigned char *prefix, int plen) { + static const unsigned char ones[4] = {0xFF, 0xFF, 0xFF, 0xFF}; return (plen >= 8 && prefix[0] == 0xFF) || (plen >= 10 && prefix[0] == 0xFE && (prefix[1] & 0xC0) == 0x80) || @@ -446,7 +447,8 @@ martian_prefix(const unsigned char *prefix, int plen) (prefix[15] == 0 || prefix[15] == 1)) || (plen >= 96 && v4mapped(prefix) && ((plen >= 104 && (prefix[12] == 127 || prefix[12] == 0)) || - (plen >= 100 && (prefix[12] & 0xE0) == 0xE0))); + (plen >= 100 && (prefix[12] & 0xF0) == 0xE0) || + (plen >= 128 && memcmp(prefix + 12, ones, 4) == 0))); } int
peview: Fix SAL annotation warning
@@ -302,7 +302,7 @@ NTSTATUS PvpPeSectionsEnumerateThread( WCHAR value[PH_INT64_STR_LEN_1]; sectionNode = PhAllocateZero(sizeof(PV_SECTION_NODE)); - sectionNode->UniqueId = i + 1; + sectionNode->UniqueId = UInt32Add32To64(i, 1); sectionNode->UniqueIdString = PhFormatUInt64(sectionNode->UniqueId, FALSE); sectionNode->SectionHeader = &PvMappedImage.Sections[i];
Remove early return from engine_map() in case of hit At this point cacheline status in request map is stale, as lookup was performed before upgrading hash bucket lock. If indeed all cachelines are mapped, this will be determined in the main loop of engine_map().
@@ -402,9 +402,6 @@ static void ocf_engine_map(struct ocf_request *req) uint64_t core_line; ocf_core_id_t core_id = ocf_core_get_id(req->core); - if (!ocf_engine_unmapped_count(req)) - return; - if (ocf_engine_unmapped_count(req) > ocf_freelist_num_free(cache->freelist)) { ocf_req_set_mapping_error(req);
Fix declaration error in switch statement
@@ -265,11 +265,11 @@ JanetSlot janetc_resolve( JanetBinding binding = janet_resolve_ext(c->env, sym); if (binding.type == JANET_BINDING_NONE) { Janet handler = janet_table_get(c->env, janet_ckeywordv("missing-symbol")); + Janet entry; switch (janet_type(handler)) { case JANET_NIL: break; case JANET_FUNCTION: - Janet entry; if (!lookup_missing(c, sym, janet_unwrap_function(handler), &entry)) return janetc_cslot(janet_wrap_nil()); binding = janet_binding_from_entry(entry);
doc(xerces): update installation instruction when using homebrew
@@ -68,7 +68,7 @@ the mount point, then it uses the mount point's name instead. - CMake 3.6 or a copy of `FindXercesC.cmake` in `/usr/share/cmake-3.0/Modules/` -To include this plugin in a homebrew installation run `brew install elektra --with-dep-plugins` +To include this plugin in a homebrew installation run `brew tap elektrainitiative/elektra` followed by `brew install elektrainitiative/elektra/elektra --with-xerces` ## Limitations
first pass at updating changelog
@@ -4,6 +4,22 @@ title: Changelog # Changelog +## AppScope 0.7 + +2021-06-11 - Maintenance Pre-Release + +This pre-release addresses the following issues: + +- **Improvement**: [#286](https://github.com/criblio/appscope/issues/286) Add support for TLS over TCP connections, and add new TLS-related environment variables +- **Improvement**: [#256](https://github.com/criblio/appscope/issues/256) Add support for attaching AppScope to a running process +- **Improvement**: [#292](https://github.com/criblio/appscope/issues/292) Add support for attaching AppScope to a running process from the CLI +- **Improvement**: [#132](https://github.com/criblio/appscope/issues/132) Add new ``scope logs`` command to view logs from the CLI +- **Improvement**: [#XXX](https://github.com/criblio/appscope/issues/XXX) Add new ``--interval`` option to ``scope watch`` command to run AppScope at intervals, from the CLI +- **Improvement**: [#286](https://github.com/criblio/appscope/issues/286) Drop support for CentOS 6, because TLS support requires GLIBC_2.17 or newer, and CentOS 6 is stalled at GLIBC_2.12 +- **Improvement**: [#XXX](https://github.com/criblio/appscope/issues/XXX) Make developer docs available at https://github.com/criblio/appscope/tree/master/docs +- **Fix**: [#265](https://github.com/criblio/appscope/issues/265) Re-direct bash malloc functions to glibc to avoid segfaults and memory allocation issues +- **Fix**: [#279](https://github.com/criblio/appscope/issues/279) Correct handling of pointers returned by gnutls, which previously could cause ``git clone`` to crash + ## AppScope 0.6.1 2021-04-26 - Maintenance Pre-Release
HW: Fixing MMIO access to action
@@ -1381,7 +1381,14 @@ BEGIN mmx_d_q.rd_strobe <= '0'; mmio_action_addr_q <= mmio_action_addr_q; mmio_action_data_q <= mmio_action_data_q; - IF ha_mm_w_q.valid = '1' THEN + IF (ha_mm_r_q.valid AND ha_mm_r_q.rnw) = '1' THEN + IF mmio_read_master_access_q = '1' THEN + mmio_action_addr_q(17 DOWNTO 12) <= ha_mm_r_q.ad(15 DOWNTO 10); + ELSE + mmio_action_addr_q(17 DOWNTO 12) <= "01" & context_status_mmio_dout(CTX_STAT_ACTION_ID_INT_L DOWNTO CTX_STAT_ACTION_ID_INT_R); + END IF; + mmio_action_addr_q(11 DOWNTO 2) <= ha_mm_r_q.ad(9 DOWNTO 0); + ELSIF ha_mm_w_q.valid = '1' THEN IF mmio_write_master_access_q = '1' THEN mmio_action_addr_q(17 DOWNTO 12) <= ha_mm_w_q.ad(15 DOWNTO 10); ELSE @@ -1389,13 +1396,6 @@ BEGIN END IF; mmio_action_addr_q(11 DOWNTO 2) <= ha_mm_w_q.ad(9 DOWNTO 0); mmio_action_data_q <= ha_mm_w_q.data(31 DOWNTO 0); - ELSIF ha_mm_r_q.valid = '1' THEN - IF mmio_read_master_access_q = '1' THEN - mmio_action_addr_q(17 DOWNTO 12) <= ha_mm_r_q.ad(15 DOWNTO 10); - ELSE - mmio_action_addr_q(17 DOWNTO 12) <= "01" & context_status_mmio_dout(CTX_STAT_ACTION_ID_INT_L DOWNTO CTX_STAT_ACTION_ID_INT_R); - END IF; - mmio_action_addr_q(11 DOWNTO 2) <= ha_mm_r_q.ad(9 DOWNTO 0); END IF; mmio_action_write_q <= mmio_action_write_q OR
fix(coder) Fix typo with while loops
@@ -416,7 +416,7 @@ generate_stat = function(stat) ]], { COND_STATS = cond_cstats, COND = cond_cvalue, - CLOCK = block_cstats + BLOCK = block_cstats }) elseif tag == ast.Stat.Repeat then
Disable RPCC macro on MIPS24K
@@ -43,6 +43,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef ASSEMBLER +#if !defined(MIPS24K) static inline unsigned int rpcc(void){ unsigned long ret; @@ -53,6 +54,7 @@ static inline unsigned int rpcc(void){ return ret; } #define RPCC_DEFINED +#endif static inline int blas_quickdivide(blasint x, blasint y){ return x / y;
Add note on using -cw to the -esw help text
@@ -363,9 +363,17 @@ ADVANCED COMPRESSION zero or one. For example to swap the RG channels, and replace alpha with 1, the swizzle 'grb1' should be used. - Note that the input swizzle is assumed to take place before any - compression, and all error weighting applies to the post-swizzle - channel ordering. + The input swizzle takes place before any compression, and all + error weighting applied using the -cw option is applied to the + post-swizzle channel ordering. + + By default all 4 post-swizzle channels are included in the error + metrics during compression. When using -esw to map two channel + data to the L+A endpoint (e.g. -esw rrrg) the luminance data + stored in the rgb channels will be weighted three times more + strongly than the alpha channel. This can be corrected using the + -cw option to zero the weights of unused channels; e.g. using + -cw 1 0 0 1. -dsw <swizzle> Swizzle the color components after decompression. The swizzle is
change clock to CLOCK_PROCESS_CPUTIME_ID
@@ -189,11 +189,11 @@ int main(int argc, char *argv[]){ for(l =0;l< loops;l++){ - clock_gettime(CLOCK_REALTIME,&time_start); + clock_gettime(CLOCK_PROCESS_CPUTIME_ID,&time_start); TRSV(&uplo,&transa,&diag,&n,a,&n,x,&inc_x); - clock_gettime(CLOCK_REALTIME,&time_end); + clock_gettime(CLOCK_PROCESS_CPUTIME_ID,&time_end); nanos = time_end.tv_nsec - time_start.tv_nsec; seconds = time_end.tv_sec - time_start.tv_sec;
[GB] ADD instructions disable necessary flags
@@ -1085,7 +1085,7 @@ impl CpuState { Some(InstrInfo::seq(1, 1)) } 0xe6 => { - // AND d8 + // AND u8 let a = self.reg(RegisterName::A); let val = self.mmu.read(self.get_pc() + 1); if debug { @@ -1096,6 +1096,8 @@ impl CpuState { a.write_u8(&self, result); self.update_flag(FlagUpdate::Zero(result == 0)); self.update_flag(FlagUpdate::HalfCarry(true)); + self.update_flag(FlagUpdate::Carry(false)); + self.update_flag(FlagUpdate::Subtract(false)); Some(InstrInfo::seq(2, 2)) } 0xc6 => { @@ -1621,8 +1623,7 @@ impl CpuState { } let result = a.read_u8(&self) & op.read_u8_with_mode(&self, read_mode); a.write_u8(&self, result); - self.update_flag(FlagUpdate::Zero(result == 0)); - self.update_flag(FlagUpdate::HalfCarry(true)); + self.set_flags(result == 0, false, true, false); // TODO(PT): Should be 2 for HL InstrInfo::seq(1, 1) } @@ -3335,6 +3336,7 @@ mod tests { cpu.reg(RegisterName::A).write_u8(&cpu, 0x5a); cpu.reg(RegisterName::L).write_u8(&cpu, 0x3f); + cpu.set_flags(true, true, true, true); // When I run AND A, L // Then I get the expected result @@ -3351,6 +3353,7 @@ mod tests { cpu.reg(RegisterName::H).write_u8(&cpu, 0xff); cpu.reg(RegisterName::HL) .write_u8_with_mode(&cpu, AddressingMode::Deref, 0x00); + cpu.set_flags(false, false, false, false); // TODO(PT): This variant should take 2 cycles gb.run_opcode_with_expected_attrs(&mut cpu, 0xa6, 1, 1); assert_eq!(cpu.reg(RegisterName::A).read_u8(&cpu), 0x00); @@ -3368,6 +3371,7 @@ mod tests { let gb = get_system(); let mut cpu = gb.cpu.borrow_mut(); + cpu.set_flags(true, true, true, true); cpu.reg(RegisterName::A).write_u8(&cpu, 0x5a); // And a value just after the instruction pointer gb.mmu.write(1, 0x38);
opal-ci/fetch-debian-jessie-installer: follow redirects
#!/bin/bash -curl http://ftp.debian.org/debian/dists/jessie/main/installer-ppc64el/current/images/netboot/debian-installer/ppc64el/vmlinux -o debian-jessie-vmlinux -curl http://ftp.debian.org/debian/dists/jessie/main/installer-ppc64el/current/images/netboot/debian-installer/ppc64el/initrd.gz -o debian-jessie-initrd.gz +curl -L http://ftp.debian.org/debian/dists/jessie/main/installer-ppc64el/current/images/netboot/debian-installer/ppc64el/vmlinux -o debian-jessie-vmlinux +curl -L http://ftp.debian.org/debian/dists/jessie/main/installer-ppc64el/current/images/netboot/debian-installer/ppc64el/initrd.gz -o debian-jessie-initrd.gz
Fix showing unsupported processor groups on affinity dialog
@@ -569,7 +569,7 @@ BEGIN CONTROL "CPU 63",IDC_CPU63,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,224,190,39,10 PUSHBUTTON "Select all",IDC_SELECTALL,7,206,50,14 PUSHBUTTON "Deselect all",IDC_DESELECTALL,60,206,50,14 - COMBOBOX IDC_GROUPCPU,220,4,52,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP | NOT WS_VISIBLE + COMBOBOX IDC_GROUPCPU,220,4,52,30,CBS_DROPDOWNLIST | CBS_SORT | NOT WS_VISIBLE | WS_VSCROLL | WS_TABSTOP END IDD_SYSINFO DIALOGEX 0, 0, 423, 247
Fix group deleted state handling
@@ -702,7 +702,7 @@ int DeRestPluginPrivate::setGroupState(const ApiRequest &req, ApiResponse &rsp) return REQ_READY_SEND; } - if (!group || (group->state() == Group::StateDeleted)) + if (!group || (group->state() != Group::StateNormal)) { rsp.httpStatus = HttpStatusNotFound; rsp.list.append(errorToMap(ERR_RESOURCE_NOT_AVAILABLE, QString("/groups/%1").arg(id), QString("resource, /groups/%1, not available").arg(id)));
Extend UNIX socket unit tests add test case for lack of permission to the socket
@@ -406,6 +406,50 @@ transportSendForFilepathUnixTransmitsMsg(void** state) unlink(path); } +static void +transportSendForFilepathUnixFailedTransmitsMsg(void** state) +{ + const char* path = "/tmp/mysocket_file"; + + // Create a unix address for a test socket + struct sockaddr_un addr; + struct stat socket_stat; + addr.sun_family = AF_UNIX; + memset(addr.sun_path, 0, sizeof(addr.sun_path)); + strncpy(addr.sun_path, path, strlen(path)); + int addr_len = sizeof(sa_family_t) + strlen(path) + 1; + + // Create a test socket that our transport can send to + int sd = socket(AF_UNIX, SOCK_STREAM, 0); + if (sd == -1) { + fail_msg("Couldn't create socket"); + } + if (bind(sd, &addr, addr_len) == -1) { + fail_msg("Couldn't bind socket"); + } + if (listen(sd, 10) == -1) { + fail_msg("Couldn't listen on socket"); + } + + if (stat(path, &socket_stat) != 0) { + fail_msg("Couldn't stat socket"); + } + + // Take the write permission + if (chmod(path, socket_stat.st_mode & ~(S_IWUSR | S_IWGRP | S_IWOTH)) != 0 ){ + fail_msg("Couldn't take the write permission"); + } + + // Verify that the transport can be created, but is not connected + transport_t* t = transportCreateUnix(path); + assert_non_null(t); + assert_true(transportNeedsConnection(t)); + transportDestroy(&t); + + close(sd); + unlink(path); +} + static void transportSendForFileWritesToFileAfterFlushWhenFullyBuffered(void** state) { @@ -524,6 +568,7 @@ main(int argc, char* argv[]) cmocka_unit_test(transportSendForUdpTransmitsMsg), cmocka_unit_test(transportSendForAbstractUnixTransmitsMsg), cmocka_unit_test(transportSendForFilepathUnixTransmitsMsg), + cmocka_unit_test(transportSendForFilepathUnixFailedTransmitsMsg), cmocka_unit_test(transportSendForFileWritesToFileAfterFlushWhenFullyBuffered), cmocka_unit_test(transportSendForFileWritesToFileImmediatelyWhenLineBuffered), cmocka_unit_test(dbgHasNoUnexpectedFailures),
zephyr test: usbc_ocp: Log during tests Log errors from over-current functions during tests. TEST=twister -s zephyr/test/drivers/drivers.usbc_ocp BRANCH=none Code-Coverage: Zoss
#include "usbc_ocp.h" #include "util.h" -#ifndef TEST_BUILD #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) -#else -#define CPRINTF(args...) -#define CPRINTS(args...) -#endif /* * Number of seconds until a latched-off port is re-enabled for sourcing after
Reduce vardiff log spam
@@ -242,8 +242,7 @@ namespace MiningCore.Mining if (context.VarDiff != null) { - if(isIdleUpdate) - logger.Info(() => $"[{LogCat}] [{client.ConnectionId}] Updating VarDiff" + (isIdleUpdate ? " [idle]" : string.Empty)); + logger.Debug(() => $"[{LogCat}] [{client.ConnectionId}] Updating VarDiff" + (isIdleUpdate ? " [idle]" : string.Empty)); // get or create manager VarDiffManager varDiffManager;
SH2 - added missing file paths data\pic\out\statuebox.tex data\pic\out\statuekey.tex
@@ -72,5 +72,5 @@ data\pic\out\p_redpaper.tex data\pic\out\p_spana.tex data\pic\out\p_swamp.tex data\pic\out\p_swamp2.tex -data\pic\out\p_statuebox.tex -data\pic\out\p_statuekey.tex \ No newline at end of file +data\pic\out\statuebox.tex +data\pic\out\statuekey.tex
Fix peview CFG entry counts
@@ -886,11 +886,11 @@ INT_PTR CALLBACK PvpPeLoadConfigDlgProc( ADD_VALUE(L"CFG Check Function pointer", PhaFormatString(L"0x%Ix", (Config)->GuardCFCheckFunctionPointer)->Buffer); \ ADD_VALUE(L"CFG Check Dispatch pointer", PhaFormatString(L"0x%Ix", (Config)->GuardCFDispatchFunctionPointer)->Buffer); \ ADD_VALUE(L"CFG Function table", PhaFormatString(L"0x%Ix", (Config)->GuardCFFunctionTable)->Buffer); \ - ADD_VALUE(L"CFG Function table entry count", PhaFormatString(L"0x%Ix", (Config)->GuardCFFunctionCount)->Buffer); \ + ADD_VALUE(L"CFG Function table entry count", PhaFormatUInt64((Config)->GuardCFFunctionCount, TRUE)->Buffer); \ ADD_VALUE(L"CFG IatEntry table", PhaFormatString(L"0x%Ix", (Config)->GuardAddressTakenIatEntryTable)->Buffer); \ - ADD_VALUE(L"CFG IatEntry table entry count", PhaFormatString(L"0x%Ix", (Config)->GuardAddressTakenIatEntryCount)->Buffer); \ + ADD_VALUE(L"CFG IatEntry table entry count", PhaFormatUInt64((Config)->GuardAddressTakenIatEntryCount, TRUE)->Buffer); \ ADD_VALUE(L"CFG LongJump table", PhaFormatString(L"0x%Ix", (Config)->GuardLongJumpTargetTable)->Buffer); \ - ADD_VALUE(L"CFG LongJump table entry count", PhaFormatString(L"0x%Ix", (Config)->GuardLongJumpTargetCount)->Buffer); \ + ADD_VALUE(L"CFG LongJump table entry count", PhaFormatUInt64((Config)->GuardLongJumpTargetCount, TRUE)->Buffer); \ } if (PvMappedImage.Magic == IMAGE_NT_OPTIONAL_HDR32_MAGIC)
Only realloc() when buffer is being enlarged `if (have > 0)` avoids `realloc(buffer,0)` and thus fixes buffering bug This also reduces the number of realloc() calls made by reusing the existing buffer where possible.
@@ -31,6 +31,7 @@ public: strm.avail_in = 0; strm.next_in = Z_NULL; + bufsiz=GZBUFSIZ; buffer=(char*)std::malloc(GZBUFSIZ*sizeof(char)); if(buffer==NULL) { throw ("out of memory"); @@ -73,7 +74,6 @@ public: strm.next_in=buffin; /* run inflate() on input until output buffer not full */ unsigned int total=0; - _currentOutBufSize = 0; do { strm.avail_out = GZBUFSIZ; strm.next_out = buffout; @@ -99,9 +99,10 @@ public: } unsigned int have = GZBUFSIZ - strm.avail_out; - if (have > 0) { + if (total + have > bufsiz) { buffer=(char*)std::realloc(buffer,sizeof(char)*(total+have)); if(buffer==NULL) throw ("out of memory"); + bufsiz = total + have; } memcpy((void*)&buffer[total], &buffout[0], sizeof(char)*have); total+=have; @@ -109,7 +110,6 @@ public: setg(buffer, buffer, &buffer[total]); - _currentOutBufSize = total; return total==0?EOF:this->buffer[0]; } @@ -119,9 +119,9 @@ protected: unsigned char buffin[GZBUFSIZ]; unsigned char buffout[GZBUFSIZ]; char* buffer; + size_t bufsiz; z_stream strm; int status_flag; - int _currentOutBufSize; };
py/objgenerator: Remove unneeded forward decl and clean up white space.
* * The MIT License (MIT) * - * Copyright (c) 2013, 2014 Damien P. George + * Copyright (c) 2013-2019 Damien P. George * Copyright (c) 2014-2017 Paul Sokolovsky * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -247,10 +247,8 @@ STATIC mp_obj_t gen_instance_send(mp_obj_t self_in, mp_obj_t send_value) { return ret; } } - STATIC MP_DEFINE_CONST_FUN_OBJ_2(gen_instance_send_obj, gen_instance_send); -STATIC mp_obj_t gen_instance_close(mp_obj_t self_in); STATIC mp_obj_t gen_instance_throw(size_t n_args, const mp_obj_t *args) { // The signature of this function is: throw(type[, value[, traceback]]) // CPython will pass all given arguments through the call chain and process them @@ -276,7 +274,6 @@ STATIC mp_obj_t gen_instance_throw(size_t n_args, const mp_obj_t *args) { return ret; } } - STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(gen_instance_throw_obj, 2, 4, gen_instance_throw); STATIC mp_obj_t gen_instance_close(mp_obj_t self_in) { @@ -298,7 +295,6 @@ STATIC mp_obj_t gen_instance_close(mp_obj_t self_in) { return mp_const_none; } } - STATIC MP_DEFINE_CONST_FUN_OBJ_1(gen_instance_close_obj, gen_instance_close); STATIC mp_obj_t gen_instance_pend_throw(mp_obj_t self_in, mp_obj_t exc_in) {
sockeye: also pass the state when instantiating the modules
@@ -300,7 +300,7 @@ gen_body_defs mi x i = case x of -- | om <- map_spec_flatten mi x]) (AST.Overlays _ src dest) -> (1, [assert i $ predicate "overlay" [generate src, generate dest]]) -- (AST.Instantiates _ i im args) -> [forall_uqr mi i (predicate ("add_" ++ im) ["IDT_" ++ (AST.refName i)])] - (AST.Instantiates _ ii im args) -> (0, [ predicate ("add_" ++ im) [gen_index ii] ]) + (AST.Instantiates _ ii im args) -> (1, [ predicate ("add_" ++ im) ([statevar i] ++ [gen_index ii] ++ [statevar (i+1)]) ]) -- (AST.Binds _ i binds) -> [forall_uqr mi i $ gen_bind_defs ("IDT_" ++ (AST.refName i)) binds] (AST.Binds _ ii binds) -> gen_bind_defs (gen_index ii) binds (i, []) (AST.Forall _ varName varRange body) -> (0, [forall_qual mi varName varRange body]) @@ -314,7 +314,7 @@ count_num_facts mi x = case x of (AST.Maps _ _ _) -> sum([1 | om <- map_spec_flatten mi x]) (AST.Overlays _ src dest) -> 1 -- (AST.Instantiates _ i im args) -> [forall_uqr mi i (predicate ("add_" ++ im) ["IDT_" ++ (AST.refName i)])] - (AST.Instantiates _ i im args) -> 0 + (AST.Instantiates _ i im args) -> 1 -- (AST.Binds _ i binds) -> [forall_uqr mi i $ gen_bind_defs ("IDT_" ++ (AST.refName i)) binds] (AST.Binds _ i binds) -> sum([1 | b <- binds]) (AST.Forall _ varName varRange body) -> 0
admin/meta-packages: remove libmlx4-rdmav2 from ohpc-base for sles
Summary: Meta-packages to ease installation Name: meta-packages -Version: 1.3.4 +Version: 1.3.5 Release: 1 License: Apache-2.0 Group: %{PROJ_NAME}/meta-package @@ -77,7 +77,6 @@ Requires: yum-utils %endif %if 0%{?sles_version} || 0%{?suse_version} Requires: glibc-locale -Requires: libmlx4-rdmav2 Requires: nfs-kernel-server %endif %description -n %{PROJ_NAME}-base
Fix issue where actors walk off screen sometimes after dialogue
@@ -463,6 +463,7 @@ void SceneUpdateActors_b() { if (IS_FRAME_64) { + initrand(DIV_REG); r = rand(); if (time == 0 || time == 128) @@ -484,7 +485,7 @@ void SceneUpdateActors_b() SceneRenderActor_b(i); ++r; } - else if (actors[i].movement_type == AI_RANDOM_WALK) + else if (actors[i].movement_type == AI_RANDOM_WALK && ACTOR_ON_TILE(i)) { update_dir = directions[r & 3]; SceneUpdateActorMovement_b(i); @@ -511,7 +512,7 @@ void SceneUpdateActors_b() SceneRenderActor_b(i); ++r; } - else if (actors[i].movement_type == AI_RANDOM_WALK) + else if (actors[i].movement_type == AI_RANDOM_WALK && ACTOR_ON_TILE(i)) { update_dir = directions[r & 3]; SceneUpdateActorMovement_b(i);
Reorganize ccm context structure.
@@ -76,15 +76,15 @@ extern "C" { */ typedef struct mbedtls_ccm_context { - mbedtls_cipher_context_t MBEDTLS_PRIVATE(cipher_ctx); /*!< The cipher context used. */ unsigned char MBEDTLS_PRIVATE(y)[16]; /*!< The Y working buffer */ unsigned char MBEDTLS_PRIVATE(ctr)[16]; /*!< The counter buffer */ - unsigned char MBEDTLS_PRIVATE(q); /*!< The Q working value */ + mbedtls_cipher_context_t MBEDTLS_PRIVATE(cipher_ctx); /*!< The cipher context used. */ size_t MBEDTLS_PRIVATE(plaintext_len); /*!< Total plaintext length */ size_t MBEDTLS_PRIVATE(add_len); /*!< Total authentication data length */ size_t MBEDTLS_PRIVATE(tag_len); /*!< Total tag length */ size_t MBEDTLS_PRIVATE(processed); /*!< How many bytes of input data were processed (chunked input) */ - int MBEDTLS_PRIVATE(mode); /*!< The operation to perform: + unsigned char MBEDTLS_PRIVATE(q); /*!< The Q working value */ + unsigned char MBEDTLS_PRIVATE(mode); /*!< The operation to perform: #MBEDTLS_CCM_ENCRYPT or #MBEDTLS_CCM_DECRYPT or #MBEDTLS_CCM_STAR_ENCRYPT or
Fix test guards
@@ -345,7 +345,7 @@ void x509_crt_check(char *subject_key_file, char *subject_pwd, issuer_key_type = mbedtls_pk_get_type(&issuer_key); -#if defined(MBEDTLS_RSA_C) +#if defined(MBEDTLS_RSA_C) && defined(MBEDTLS_PK_RSA_ALT_SUPPORT) /* For RSA PK contexts, create a copy as an alternative RSA context. */ if (pk_wrap == 1 && issuer_key_type == MBEDTLS_PK_RSA) { TEST_ASSERT(mbedtls_pk_setup_rsa_alt(&issuer_key_alt,
Update several docstrings.
(if (= i nil) nil (get ind i))) (defn take-until - "Given a predicate, take only elements from an indexed type that satisfy - the predicate, and abort on first failure. Returns a new array." + "Same as (take-while (complement pred) ind)." [pred ind] (def i (find-index pred ind)) (if i ind)) (defn take-while - "Same as (take-until (complement pred) ind)." + "Given a predicate, take only elements from an indexed type that satisfy + the predicate, and abort on first failure. Returns a new array." [pred ind] (take-until (complement pred) ind)) (defn drop-until - "Given a predicate, remove elements from an indexed type that satisfy - the predicate, and abort on first failure. Returns a new array." + "Same as (drop-while (complement pred) ind)." [pred ind] (def i (find-index pred ind)) (if i @[])) (defn drop-while - "Same as (drop-until (complement pred) ind)." + "Given a predicate, remove elements from an indexed type that satisfy + the predicate, and abort on first failure. Returns a new array." [pred ind] (drop-until (complement pred) ind))
Fix Win32 stack size
@@ -95,7 +95,7 @@ elseif(WIN32) # for example: dumpbin /DISASM wasm3.exe /out:wasm3.S #set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEBUG:FULL") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /F8388608") # stack size + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:8388608") # stack size else() set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Oxs /Oy /GS- /Qvec -Clang -O3") endif()
Remove terrain enum. It won't be used just yet.
@@ -1085,23 +1085,6 @@ typedef enum BGT_GENERIC } e_bgloldtype; -// Caskey, Damon V -// 2019-02-02 -// -// Types of terrian in a level that can -// affect movement. -typedef enum -{ - TERRAIN_TYPE_NONE = 0, - TERRAIN_TYPE_OBSTACLE = (1 << 0), - TERRAIN_TYPE_SCREEN_LEFT = (1 << 1), - TERRAIN_TYPE_SCREEN_RIGHT = (1 << 2), - TERRAIN_TYPE_HOLE = (1 << 3), - TERRAIN_TYPE_WALL = (1 << 4), - TERRAIN_TYPE_Z_BACKGROUND = (1 << 5), - TERRAIN_TYPE_Z_FOREGROUND = (1 << 6) -} e_terrain_type; - typedef enum { /* @@ -2490,7 +2473,7 @@ typedef struct entity e_attacking_state attacking; // ~~ - e_terrain_type hitwall; // == 1 in the instant that hit the wall/platform/obstacle, else == 0 + bool hitwall; // == 1 in the instant that hit the wall/platform/obstacle, else == 0 int getting; int turning;
Tests: fixed tests to work without openssl support.
@@ -470,6 +470,9 @@ def _clear_conf(sock, log=None): check_success(resp) + if 'openssl' not in option.available['modules']: + return + try: certs = json.loads(http.get( url='/certificates',
nx: Cleanup init message for P9 RNG
@@ -57,7 +57,7 @@ void nx_p9_rng_init(void) bar | P9X_NX_MMIO_BAR_EN); /* Read config register for pace info */ xscom_read(chip->id, P9X_NX_RNG_CFG, &tmp); - prlog(PR_INFO, "%x NX RNG pace:%lli)\n", chip->id, + prlog(PR_INFO, "NX RNG[%x] pace:%lli\n", chip->id, 0xffff & (tmp >> 2)); /* 2) DARN BAR */
Dump of deag/lookup routes has is_drop=1
@@ -2168,6 +2168,8 @@ fib_path_encode (fib_node_index_t path_list_index, case FIB_PATH_TYPE_SPECIAL: break; case FIB_PATH_TYPE_DEAG: + api_rpath->rpath.frp_fib_index = path->deag.fp_tbl_id; + api_rpath->dpo = path->fp_dpo; break; case FIB_PATH_TYPE_RECURSIVE: api_rpath->rpath.frp_addr = path->recursive.fp_nh.fp_ip;
Remove unused static global strings. The linker may optimize these out for non debug builds, but I kind of doubt it since the constructors and destructors involve heap allocaitons.
namespace ARIASDK_NS_BEGIN { -static const std::string NetworkCostNames[] = { - "Unknown", - "Unmetered", - "Metered", - "Roaming", - // Reserved network costs - "Reserved", - "Reserved", - "Reserved" -}; - -static const std::string PowerSourceNames[] = { - "Unknown", - "Battery", - "Charging", - // Reserved power states - "Reserved", - "Reserved", - "Reserved" -}; - class DeviceStateHandler : public PAL::IPropertyChangedCallback {
Silence invalid stringop-overflow warning on GCC
@@ -339,8 +339,17 @@ oc_parse_ipv6_address(const char *address, size_t len, oc_endpoint_t *endpoint) int i = addr_idx - 1; addr_idx = OC_IPV6_ADDRLEN - 1; while (i >= split) { +#ifdef __GNUC__ +// GCC thinks that addr has size=4 instead of size=16 and complains about +// overflow +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstringop-overflow" +#endif // __GNUC__ addr[addr_idx] = addr[i]; addr[i] = 0; +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif // __GNUC__ i--; addr_idx--; }
xpath REFACTOR remove dead code (break)
@@ -2043,7 +2043,6 @@ step: case LYXP_TOKEN_NAMETEST: ++(*tok_idx); goto reparse_predicate; - break; case LYXP_TOKEN_NODETYPE: ++(*tok_idx); @@ -2366,7 +2365,6 @@ reparse_path_expr(const struct ly_ctx *ctx, struct lyxp_expr *exp, uint16_t *tok LY_CHECK_RET(rc); ++(*tok_idx); goto predicate; - break; case LYXP_TOKEN_DOT: case LYXP_TOKEN_DDOT: case LYXP_TOKEN_AT: @@ -2381,7 +2379,6 @@ reparse_path_expr(const struct ly_ctx *ctx, struct lyxp_expr *exp, uint16_t *tok rc = reparse_function_call(ctx, exp, tok_idx, depth); LY_CHECK_RET(rc); goto predicate; - break; case LYXP_TOKEN_OPER_PATH: case LYXP_TOKEN_OPER_RPATH: /* AbsoluteLocationPath */ @@ -2392,12 +2389,10 @@ reparse_path_expr(const struct ly_ctx *ctx, struct lyxp_expr *exp, uint16_t *tok /* Literal */ ++(*tok_idx); goto predicate; - break; case LYXP_TOKEN_NUMBER: /* Number */ ++(*tok_idx); goto predicate; - break; default: LOGVAL(ctx, LY_VCODE_XP_INTOK, lyxp_print_token(exp->tokens[*tok_idx]), &exp->expr[exp->tok_pos[*tok_idx]]); return LY_EVALID;
pr_shelter: stop the workflow when build shelter failure Fixes:
@@ -51,7 +51,9 @@ jobs: cp -rf ${{ env.ENCLAVE_TLS_BINDIR }} /root/inclavare-containers/${{ matrix.tag }}/enclave-tls' - name: Build shelter - run: docker exec $inclavare_dev bash -c 'cd /root && source /root/.bashrc;source /etc/profile; + run: docker exec $inclavare_dev bash -c 'trap "error_handler $?" ERR; + error_handler() { local err=$?; printf "Cleaning up with exit code $err ...\n"; exit $err; }; + cd /root && source /root/.bashrc; source /etc/profile; cd inclavare-containers-$RUNE_VERSION/shelter; make; cd ..;
Fix alter table CLI help documentation In ALTER TABLE SET DISTRIBUTED BY, the "WITH(reorganize=...)" option must be specified before the "DISTRIBUTED ..." clause.
@@ -28,9 +28,9 @@ ALTER TABLE name RENAME TO new_name ALTER TABLE name SET SCHEMA new_schema ALTER TABLE [ONLY] name SET - DISTRIBUTED BY (column, [ ... ] ) + WITH (REORGANIZE=true|false) + | DISTRIBUTED BY (column, [ ... ] ) | DISTRIBUTED RANDOMLY - | WITH (REORGANIZE=true|false) ALTER TABLE [ONLY] name action [, ... ]
[kernel] fix bug in multiple calls to NEDS::computeForces when MExt in inertial frame
@@ -1050,8 +1050,12 @@ void NewtonEulerDS::computeForces(double time, SP::SiconosVector q, SP::SiconosV { computeMExt(time); assert(!isnan(_mExt->vector_sum())); - if(_isMextExpressedInInertialFrame) - ::changeFrameAbsToBody(q,_mExt); + if(_isMextExpressedInInertialFrame) { + SP::SiconosVector mExt(std11::make_shared<SiconosVector>(*_mExt)); + ::changeFrameAbsToBody(q,mExt); + _wrench->setBlock(3, *mExt); + } + else _wrench->setBlock(3, *_mExt); }
host/mesh: Mesh: pb_adv: update delayable work Switch to the new API. Consolidates reliable sending logic for the first transmission and the retransmit into one. Adds check for link active in protocol timeout. This is port of
@@ -181,7 +181,12 @@ static void prov_clear_tx(void) { BT_DBG(""); - k_work_cancel_delayable(&link.tx.retransmit); + /* If this fails, the work handler will not find any buffers to send, + * and return without rescheduling. The work handler also checks the + * LINK_ACTIVE flag, so if this call is part of reset_adv_link, it'll + * exit early. + */ + (void)k_work_cancel_delayable(&link.tx.retransmit); free_segments(); } @@ -191,7 +196,10 @@ static void reset_adv_link(void) BT_DBG(""); prov_clear_tx(); - k_work_cancel_delayable(&link.prot_timer); + /* If this fails, the work handler will exit early on the LINK_ACTIVE + * check. + */ + (void)k_work_cancel_delayable(&link.prot_timer); if (atomic_test_bit(link.flags, ADV_PROVISIONER)) { /* Clear everything except the retransmit and protocol timer @@ -279,6 +287,10 @@ static void prov_msg_recv(void) static void protocol_timeout(struct ble_npl_event *work) { + if (!atomic_test_bit(link.flags, ADV_LINK_ACTIVE)) { + return; + } + BT_DBG(""); link.rx.seg = 0U; @@ -553,6 +565,12 @@ static void send_reliable(void) break; } + if (BT_MESH_ADV(buf)->busy) { + continue; + } + + BT_DBG("%u bytes: %s", buf->om_len, bt_hex(buf->om_data, buf->om_len)); + if (i + 1 < ARRAY_SIZE(link.tx.buf) && link.tx.buf[i + 1]) { bt_mesh_adv_send(buf, NULL, NULL); } else { @@ -564,7 +582,6 @@ static void send_reliable(void) static void prov_retransmit(struct ble_npl_event *work) { int32_t timeout_ms; - int i; BT_DBG(""); @@ -595,25 +612,7 @@ static void prov_retransmit(struct ble_npl_event *work) return; } - for (i = 0; i < ARRAY_SIZE(link.tx.buf); i++) { - struct os_mbuf *buf = link.tx.buf[i]; - - if (!buf) { - break; - } - - if (BT_MESH_ADV(buf)->busy) { - continue; - } - - BT_DBG("%u bytes: %s", buf->om_len, bt_hex(buf->om_data, buf->om_len)); - - if (i + 1 < ARRAY_SIZE(link.tx.buf) && link.tx.buf[i + 1]) { - bt_mesh_adv_send(buf, NULL, NULL); - } else { - bt_mesh_adv_send(buf, &buf_sent_cb, NULL); - } - } + send_reliable(); } static int bearer_ctl_send(uint8_t op, const void *data, uint8_t data_len,
Fix up Prometeus by removing the requests JSON object
@@ -43,6 +43,7 @@ module H2O status, headers, body = @app.call(env) stats = JSON.parse(body.join) version = stats.delete('server-version') || '' + requests = stats.delete('requests') || '' stats = stats.select {|k, v| v.kind_of?(Numeric) || v.kind_of?(Array) } s = "" stats.each {|k, v|
Toyota: remove redundant test already test this
@@ -139,22 +139,6 @@ class TestToyotaSafety(common.PandaSafetyTest, common.InterceptorSafetyTest, should_tx = not req and not req2 and angle == 0 self.assertEqual(should_tx, self._tx(self._lta_msg(req, req2, angle))) - def test_steer_req_bit(self): - """ - On Toyota, you can ramp up torque and then set the STEER_REQUEST bit and the - EPS will ramp up faster than the effective panda safety limits. This tests: - - Nothing is sent when cutting torque - - Nothing is blocked when sending torque normally - """ - self.safety.set_controls_allowed(True) - for _ in range(100): - self._set_prev_torque(self.MAX_TORQUE) - self.assertFalse(self._tx(self._torque_cmd_msg(self.MAX_TORQUE, steer_req=0))) - - self._set_prev_torque(self.MAX_TORQUE) - for _ in range(100): - self.assertTrue(self._tx(self._torque_cmd_msg(self.MAX_TORQUE, steer_req=1))) - def test_rx_hook(self): # checksum checks for msg in ["trq", "pcm"]:
Removes component_test_new_ecdh_context in all.sh Commit removes the component_test_new_new_ecdh_context in all.sh.
@@ -1076,22 +1076,6 @@ component_test_ecp_restartable_no_internal_rng () { # no SSL tests as they all depend on having a DRBG } -component_test_new_ecdh_context () { - msg "build: new ECDH context (ASan build)" # ~ 6 min - CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan . - make - - msg "test: new ECDH context - main suites (inc. selftests) (ASan build)" # ~ 50s - make test - - msg "test: new ECDH context - ECDH-related part of ssl-opt.sh (ASan build)" # ~ 5s - if_build_succeeded tests/ssl-opt.sh -f ECDH - - msg "test: new ECDH context - compat.sh with some ECDH ciphersuites (ASan build)" # ~ 3 min - # Exclude some symmetric ciphers that are redundant here to gain time. - if_build_succeeded tests/compat.sh -f ECDH -V NO -e 'ARCFOUR\|ARIA\|CAMELLIA\|CHACHA\|DES\|RC4' -} - component_test_everest () { msg "build: Everest ECDH context (ASan build)" # ~ 6 min scripts/config.py set MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED
slab: use latest data in summary window ref:
@@ -153,10 +153,7 @@ void slab_automove_extstore_run(void *arg, int *src, int *dst) { bool small_slab = a->sam_before[n].chunk_size < a->item_size ? true : false; struct window_data *wd = get_window_data(a, n); - // summarize the window-up-to-now. - memset(&w_sum, 0, sizeof(struct window_data)); int w_offset = n * a->window_size; - window_sum(&a->window_data[w_offset], &w_sum, a->window_size); memset(wd, 0, sizeof(struct window_data)); unsigned int free_target = a->sam_after[n].chunks_per_page * MIN_PAGES_FREE; @@ -179,6 +176,10 @@ void slab_automove_extstore_run(void *arg, int *src, int *dst) { // set age into window wd->age = a->iam_after[n].age; + // summarize the window-up-to-now. + memset(&w_sum, 0, sizeof(struct window_data)); + window_sum(&a->window_data[w_offset], &w_sum, a->window_size); + // grab age as average of window total uint64_t age = w_sum.age / a->window_size;
build BUGFIX fix for openssl < 1.1.0
@@ -1375,7 +1375,9 @@ nc_handshake_io(struct nc_session *session) return type; } -#if defined(NC_ENABLED_SSH) && !defined(NC_ENABLED_TLS) +#ifdef NC_ENABLED_SSH + +#if OPENSSL_VERSION_NUMBER < 0x10100000L // < 1.1.0 static void nc_ssh_init(void) @@ -1393,7 +1395,9 @@ nc_ssh_destroy(void) ssh_finalize(); } -#endif /* NC_ENABLED_SSH && !NC_ENABLED_TLS */ +#endif + +#endif /* NC_ENABLED_SSH */ #ifdef NC_ENABLED_TLS @@ -1584,7 +1588,7 @@ nc_init(void) { #if defined(NC_ENABLED_SSH) && defined(NC_ENABLED_TLS) nc_ssh_tls_init(); -#elif defined(NC_ENABLED_SSH) +#elif defined(NC_ENABLED_SSH) && OPENSSL_VERSION_NUMBER < 0x10100000L nc_ssh_init(); #elif defined(NC_ENABLED_TLS) nc_tls_init(); @@ -1596,7 +1600,7 @@ nc_destroy(void) { #if defined(NC_ENABLED_SSH) && defined(NC_ENABLED_TLS) nc_ssh_tls_destroy(); -#elif defined(NC_ENABLED_SSH) +#elif defined(NC_ENABLED_SSH) && OPENSSL_VERSION_NUMBER < 0x10100000L nc_ssh_destroy(); #elif defined(NC_ENABLED_TLS) nc_tls_destroy();
BugID:18313873: Strip "-L" in ldflags for keil.py
@@ -79,10 +79,12 @@ def get_element_value(element_dict, buildstring): if match: scatterfile = AOS_RELATIVE_PATH + match.group(2) element_dict["ScatterFile"]["value"] = scatterfile - element_dict["Misc"]["value"] = match.group(1) + match.group(3) + + tmp_ldflags = match.group(1) + match.group(3) + element_dict["Misc"]["value"] = tmp_ldflags.replace("-L ", "") else: element_dict["ScatterFile"]["value"] = "" - element_dict["Misc"]["value"] = config_mk.global_ldflags + element_dict["Misc"]["value"] = config_mk.global_ldflags.replace("-L ", "") # AdsCpuType = HOST_ARCH that defined in board makefile element_dict["AdsCpuType"]["value"] = config_mk.host_arch
drop the "clangxx works" check from the vecmathlib age
@@ -574,51 +574,6 @@ ${TYPEDEF}" "typedef struct { char x; ${TYPE} y; } ac__type_alignof_; endmacro() -#################################################################### -# -# clangxx works check -# - -# TODO clang + vecmathlib doesn't work on Windows yet... -if(CLANGXX AND (NOT WIN32) AND ENABLE_HOST_CPU_DEVICES) - - message(STATUS "Checking if clang++ works (required by vecmathlib)") - - set(CXX_WORKS 0) - set(CXX_STDLIB "") - - if(NOT DEFINED CLANGXX_WORKS) - - custom_try_compile_clangxx("namespace std { class type_info; } \n #include <iostream> \n #include <type_traits>" "std::cout << \"Hello clang++ world!\" << std::endl;" _STATUS_FAIL "-std=c++11") - - if(NOT _STATUS_FAIL) - set(CXX_WORKS 1) - else() - custom_try_compile_clangxx("namespace std { class type_info; } \n #include <iostream> \n #include <type_traits>" "std::cout << \"Hello clang++ world!\" << std::endl;" _STATUS_FAIL "-stdlib=libstdc++" "-std=c++11") - if (NOT _STATUS_FAIL) - set(CXX_STDLIB "-stdlib=libstdc++") - set(CXX_WORKS 1) - else() - custom_try_compile_clangxx("namespace std { class type_info; } \n #include <iostream> \n #include <type_traits>" "std::cout << \"Hello clang++ world!\" << std::endl;" _STATUS_FAIL "-stdlib=libc++" "-std=c++11") - if(NOT _STATUS_FAIL) - set(CXX_STDLIB "-stdlib=libc++") - set(CXX_WORKS 1) - endif() - endif() - endif() - - set(CLANGXX_WORKS ${CXX_WORKS} CACHE INTERNAL "Clang++ ") - set(CLANGXX_STDLIB ${CXX_STDLIB} CACHE INTERNAL "Clang++ stdlib") - endif() - - -endif() - -if(CLANGXX_STDLIB AND (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) - set(LLVM_CXXFLAGS "${CLANGXX_STDLIB} ${LLVM_CXXFLAGS}") - set(LLVM_LDFLAGS "${CLANGXX_STDLIB} ${LLVM_LDFLAGS}") -endif() - #################################################################### # # - '-DNDEBUG' is a work-around for llvm bug 18253
Set ArchiveRecoveryRequested similar to upstream. Important Note: With this commit, now mirrors will have Checkpointer and Writer processes created, similar to upstream. This should help improve the performance and reduce the burden on single startup process to do all the work.
@@ -4586,6 +4586,9 @@ XLogReadRecoveryCommandFile(int emode) RECOVERY_COMMAND_FILE))); } + /* Enable fetching from archive recovery area */ + ArchiveRecoveryRequested = true; + FreeConfigVariables(head); } @@ -5372,10 +5375,6 @@ StartupXLOG(void) archiveCleanupCommand ? archiveCleanupCommand : "", sizeof(XLogCtl->archiveCleanupCommand)); - if (StandbyModeRequested) - ereport(LOG, - (errmsg("entering standby mode"))); - if (ArchiveRecoveryRequested) { if (StandbyModeRequested)
install clang format
@@ -25,12 +25,15 @@ jobs: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 # Runs a set of commands using the runners shell - - name: unit_test + - name: format-check run: | # https://github.com/actions/checkout/issues/81 auth_header="$(git config --local --get http.https://github.com/.extraheader)" git submodule sync --recursive git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 + + sudo apt install clang-format-6.0 + mkdir build cd build cmake ../.
Use `combinations_with_replacement` for inputs When generating combinations of values, `itertools.combinations` will not allow inputs to be repeated. This is replaced so that cases where input values match are generated, i.e. ("0", "0").
@@ -166,7 +166,7 @@ class BignumOperation(BignumTarget, metaclass=ABCMeta): """ yield from cast( Iterator[Tuple[str, str]], - itertools.combinations(cls.input_values, 2) + itertools.combinations_with_replacement(cls.input_values, 2) ) yield from cls.input_cases @@ -215,7 +215,7 @@ class BignumAdd(BignumOperation): test_name = "MPI add" input_cases = cast( List[Tuple[str, str]], - list(itertools.combinations( + list(itertools.combinations_with_replacement( [ "1c67967269c6", "9cde3", "-1c67967269c6", "-9cde3",
include/console.h: Use _STATIC_ASSERT for C++ compatibility BRANCH=none TEST=./util/compare_build.sh -b all -j 120 => MATCH
@@ -256,7 +256,7 @@ void console_has_input(void); #define _DCL_CON_CMD_ALL(NAME, ROUTINE, ARGDESC, HELP, FLAGS) \ static int (ROUTINE)(int argc, char **argv); \ static const char __con_cmd_label_##NAME[] = #NAME; \ - _Static_assert(sizeof(__con_cmd_label_##NAME) < 16, \ + _STATIC_ASSERT(sizeof(__con_cmd_label_##NAME) < 16, \ "command name '" #NAME "' is too long"); \ const struct console_command __keep __no_sanitize_address \ __con_cmd_##NAME \