message
stringlengths
6
474
diff
stringlengths
8
5.22k
Detect incorrect permutation block size in some cases + speedups for block size == 1 and block size == number of examples
@@ -110,12 +110,13 @@ static void SetSingleIndex(const TCalcScoreFold& fold, const TIndexType* indices = GetDataPtr(fold.Indices); singleIdx->yresize(docCount); - if (docPermutation == nullptr) { + if (docPermutation == nullptr || permBlockSize == docCount) { for (int doc = 0; doc < docCount; ++doc) { (*singleIdx)[doc] = indexer.GetIndex(indices[doc], bucketIndex[doc]); } - } else if (permBlockSize != FoldPermutationBlockSizeNotSet) { + } else if (permBlockSize > 1) { const int blockCount = (docCount + permBlockSize - 1) / permBlockSize; + Y_ASSERT(docPermutation[0] / permBlockSize + 1 == blockCount || docPermutation[0] + permBlockSize - 1 == docPermutation[permBlockSize - 1]); int blockStart = 0; while (blockStart < docCount) { const int blockIdx = docPermutation[blockStart] / permBlockSize;
build: log NODE_NAME on image build
@@ -153,6 +153,7 @@ def maybe_build_image(image) { return [(taskname): { stage(taskname) { node(docker_node_label) { + echo "Starting ${env.STAGE_NAME} on ${env.NODE_NAME}" checkout scm def id = imageFullName(image) docker.withRegistry('https://hub.libelektra.org',
doc: fix doxygen comments in virtio.h Fixes a recent PR that added a new API but the doxygen comments for one of the parameters didn't match the parameter name.
@@ -904,7 +904,7 @@ int virtio_pci_modern_cfgread(struct vmctx *ctx, int vcpu, struct pci_vdev *dev, * @param dev Pointer to struct pci_vdev which emulates a PCI device. * @param coff Register offset in bytes within PCI configuration space. * @param bytes Access range in bytes. - * @param value The value to write. + * @param val The value to write. * * @return 0 on handled and non-zero on non-handled. */
http.request to http.req and http.response to http.resp
@@ -98,8 +98,8 @@ In AppScope 1.0.0, a few event and metric schema elements, namely `title` and `d **HTTP** - [http.req](#metrichttpreq) -- [http.request.content_length](#metrichttpreqcontentlength) -- [http.response.content_length](#metrichttprespcontentlength) +- [http.req.content_length](#metrichttpreqcontentlength) +- [http.resp.content_length](#metrichttprespcontentlength) - [http.duration.client](#metrichttpdurationclient) - [http.duration.server](#metrichttpdurationserver) @@ -2654,7 +2654,7 @@ Structure of the `http.duration.client` metric <hr/> -### http.request.content_length [^](#schema-reference) {#metrichttpreqcontentlength} +### http.req.content_length [^](#schema-reference) {#metrichttpreqcontentlength} Structure of the `http.req.content_length` metric @@ -2679,14 +2679,14 @@ Structure of the `http.req.content_length` metric } ``` -#### `http.request.content_length` properties {#metrichttpreqcontentlengthprops} +#### `http.req.content_length` properties {#metrichttpreqcontentlengthprops} | Property | Description | |---|---| | `type` _required_ (`string`) | Distinguishes metrics from events.<br/><br/>Value must be `metric`. | | `body` _required_ (`object`) | body<br/><br/>_Details [below](#metrichttpreqcontentlengthbody)._ | -#### `http.request.content_length.body` properties {#metrichttpreqcontentlengthbody} +#### `http.req.content_length.body` properties {#metrichttpreqcontentlengthbody} | Property | Description | |---|---| @@ -2773,7 +2773,7 @@ Structure of the `http.req` metric <hr/> -### http.response.content_length [^](#schema-reference) {#metrichttprespcontentlength} +### http.resp.content_length [^](#schema-reference) {#metrichttprespcontentlength} Structure of the `http.resp.content_length` metric @@ -2817,14 +2817,14 @@ Structure of the `http.resp.content_length` metric } ``` -#### `http.response.content_length` properties {#metrichttprespcontentlengthprops} +#### `http.resp.content_length` properties {#metrichttprespcontentlengthprops} | Property | Description | |---|---| | `type` _required_ (`string`) | Distinguishes metrics from events.<br/><br/>Value must be `metric`. | | `body` _required_ (`object`) | body<br/><br/>_Details [below](#metrichttprespcontentlengthbody)._ | -#### `http.response.content_length.body` properties {#metrichttprespcontentlengthbody} +#### `http.resp.content_length.body` properties {#metrichttprespcontentlengthbody} | Property | Description | |---|---|
Keep clock_ticks in YR_RULE and YR_STRING structures even if PROFILING_ENABLED is not defined. This prevents issues caused by mismatching structure sizes when the library is compiled with PROFILING_ENABLED and the program using it does not.
@@ -235,9 +235,8 @@ typedef struct _YR_STRING YR_MATCHES matches[MAX_THREADS]; YR_MATCHES unconfirmed_matches[MAX_THREADS]; - #ifdef PROFILING_ENABLED + // Used only when PROFILING_ENABLED is defined clock_t clock_ticks; - #endif } YR_STRING; @@ -253,9 +252,8 @@ typedef struct _YR_RULE DECLARE_REFERENCE(YR_STRING*, strings); DECLARE_REFERENCE(YR_NAMESPACE*, ns); - #ifdef PROFILING_ENABLED + // Used only when PROFILING_ENABLED is defined clock_t clock_ticks; - #endif } YR_RULE;
client/server: Handle NGTCP2_ERR_STREAM_SHUT_WR
@@ -641,7 +641,9 @@ int Client::on_write_stream(uint32_t stream_id, uint8_t fin, Buffer &data) { stream_id, fin, data.rpos(), data.left(), util::timestamp()); if (n < 0) { - if (n == NGTCP2_ERR_STREAM_DATA_BLOCKED) { + switch (n) { + case NGTCP2_ERR_STREAM_DATA_BLOCKED: + case NGTCP2_ERR_STREAM_SHUT_WR: return 0; } std::cerr << "ngtcp2_conn_write_stream: " << ngtcp2_strerror(n)
Update MQTT library.
@@ -167,11 +167,9 @@ class MQTTClient: # messages processed internally. def wait_msg(self): res = self.sock.recv(1) - self.sock.setblocking(True) - if res is None: - return None if res == b"": - raise OSError(-1) + return None + self.sock.setblocking(True) if res == b"\xd0": # PINGRESP sz = self.sock.recv(1)[0] assert sz == 0
inclavared: add stormgbs back to authors list
[package] name = "inclavared" version = "0.0.1" -authors = ["Tianjia Zhang <[email protected]>"] +authors = ["Tianjia Zhang <[email protected]>", + "stormgbs <[email protected]>"] build = "build.rs" edition = "2018"
sysdeps/linux: temporary band-aid for lack of mode argument in sys_open
@@ -51,7 +51,8 @@ int sys_anon_free(void *pointer, size_t size) { } int sys_open(const char *path, int flags, int *fd) { - auto ret = do_syscall(NR_open, path, flags, 0); + // TODO: pass mode in sys_open() sysdep + auto ret = do_syscall(NR_open, path, flags, 0666); if(int e = sc_error(ret); e) return e; *fd = sc_int_result<int>(ret);
fixed topology check for json tests incorrectly failing when multiple toplogy options are provided
@@ -722,12 +722,12 @@ check_scenario_version (const bson_t *scenario) while (bson_iter_next (&iter)) { bson_iter_bson (&iter, &version_info); - if (!check_version_info (&version_info)) { - return false; + if (check_version_info (&version_info)) { + return true; } } - return true; + return false; } return check_version_info (scenario);
Add request to cite CLASS to the note
@@ -67,7 +67,7 @@ In preparation for constraining cosmology with the Large Synoptic Survey Telesco The Core Cosmology Library is written in C and incorporates the {\tt CLASS} code \citep{class} to provide predictions for the matter power spectrum.\footnote{Future versions of the library will incorporate other power-spectrum libraries and methods.} A Python wrapper is also provided for ease of use. -This note describes how to install \ccl (Section \ref{sec:install}), how \ccl is documented (Section \ref{sec:doc}), its functionality (Section \ref{sec:func}), the relevant unit tests (Section \ref{sec:tests}), directions for finding a \ccl example (Section \ref{sec:example}), the Python wrapper (Section \ref{sec:python}), future plans (Section \ref{sec:future}), means to contact the developers (Section \ref{sec:feedback}), and the license under which \ccl is released (Section \ref{sec:license}). +This note describes how to install \ccl (Section \ref{sec:install}), how \ccl is documented (Section \ref{sec:doc}), its functionality (Section \ref{sec:func}), the relevant unit tests (Section \ref{sec:tests}), directions for finding a \ccl example (Section \ref{sec:example}), the Python wrapper (Section \ref{sec:python}), future plans (Section \ref{sec:future}), means to contact the developers (Section \ref{sec:feedback}), instructions on how to cite \ccl (and {\tt CLASS}, Section \ref{sec:cite}), and the license under which \ccl is released (Section \ref{sec:license}). \section{Installation} @@ -1032,6 +1032,11 @@ In the future, we hope that \ccl will include other functionalities. Functionali If you would like to contribute to \ccl or contact the developers, please do so through the \ccl github repository located at \url{https://github.com/LSSTDESC/CCL}. +\section{Citing \ccl} +\label{sec:cite} + +If you use \ccl in your work, please provide a link to the repository and cite it as LSST DESC (in preparation). \ccl has a built-in version of {\tt CLASS} for convenience. We request that \ccl users cite the {\tt CLASS} paper: {\it CLASS II: Approximation schemes}, D. Blas, J. Lesgourgues, T. Tram, arXiv:1104.2933, JCAP 1107 (2011) 034. + \section{License} \label{sec:license} @@ -1067,7 +1072,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \input{contributions} - %{\it Facilities:} \facility{LSST} \bibliography{main}
Update docs to reflect JSON benchmarks
module Iodine # Iodine includes a lenient JSON parser that attempts to ignore JSON errors when possible and adds some extensions such as Hex numerical representations and comments. # - # On my system, the Iodine JSON parser is more than 30% faster than the native Ruby parser. When using symbols the speed increase is even higher. + # On my system, the Iodine JSON parser is more than 40% faster than the native Ruby parser. When using symbols the speed increase is even higher. # # It's easy to monkey-patch the system's `JSON.parse` method (not the `JSON.parse!` method) by using `Iodine.patch_json`. #
add new keyword 4 RUN_JAVA_PROGRAM pt 1
@@ -31,17 +31,21 @@ def extract_macro_calls2(unit, macro_value_name): def onrun_java_program(unit, *args): + args = list(args) """ Custom code generation @link: https://wiki.yandex-team.ru/yatool/java/#kodogeneracijarunjavaprogram """ - flat, kv = common.sort_by_keywords({'IN': -1, 'IN_DIR': -1, 'OUT': -1, 'OUT_DIR': -1, 'CWD': 1, 'CLASSPATH': -1, 'ADD_SRCS_TO_CLASSPATH': 0}, args) + flat, kv = common.sort_by_keywords({'IN': -1, 'IN_DIR': -1, 'OUT': -1, 'OUT_DIR': -1, 'CWD': 1, 'CLASSPATH': -1, 'CP_USE_COMMAND_FILE': 1, 'ADD_SRCS_TO_CLASSPATH': 0}, args) depends = kv.get('CLASSPATH', []) + kv.get('JAR', []) if depends: # XXX: hack to force ymake to build dependencies unit.on_run_java(['TOOL'] + depends + ["OUT", "fake.out.{}".format(hash(tuple(depends)))]) + if not kv.get('CP_USE_COMMAND_FILE'): + args += ['CP_USE_COMMAND_FILE', unit.get(['JAVA_PROGRAM_CP_USE_COMMAND_FILE']) or 'yes'] + prev = unit.get(['RUN_JAVA_PROGRAM_VALUE']) or '' new_val = (prev + ' ' + base64.b64encode(json.dumps(list(args), encoding='utf-8'))).strip() unit.set(['RUN_JAVA_PROGRAM_VALUE', new_val])
tracing: trace_reset_buffer: fail when trace_buffer_va == NULL.
@@ -34,6 +34,12 @@ void trace_reset_buffer(void) { uintptr_t i, new; + assert(trace_buffer_va); + if (!trace_buffer_va) { + debug_printf("%s: trace_buffer_va == NULL! expect badness when tracing!\n", __FUNCTION__); + return; + } + struct trace_buffer *buf = (struct trace_buffer *)trace_buffer_va; //buf->master = (struct trace_buffer *)trace_buffer_master;
Add some comments to yr_bitmask_find_non_colliding_offset.
@@ -39,7 +39,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // Finds the smaller offset within bitmask A where bitmask B can be accommodated // without bit collisions. A collision occurs when bots bitmasks have a bit set // to 1 at the same offset. This function assumes that the first bit in B is 1 -// and do optmizations that rely on that. +// and do optimizations that rely on that. // // The function also receives a pointer to an uint64_t where the function stores // a value that is used for speeding-up subsequent searches over the same @@ -68,8 +68,13 @@ uint32_t yr_bitmask_find_non_colliding_offset( { uint32_t i, j, k; + // Ensure that the first bit of bitmask B is set, as this function does some + // optimizations that rely on that. assert(yr_bitmask_isset(b, 0)); + // Skip all slots that are filled with 1s. It's safe to do that because the + // first bit of B is 1, so we won't be able to accommodate B at any offset + // within such slots. for (i = *off_a / YR_BITMASK_SLOT_BITS; i <= len_a / YR_BITMASK_SLOT_BITS && a[i] == 0xFFFFFFFFFFFFFFFFL; i++); @@ -78,6 +83,7 @@ uint32_t yr_bitmask_find_non_colliding_offset( for (; i <= len_a / YR_BITMASK_SLOT_BITS; i++) { + // The slot is filled with 1s, we can safely skip it. if (a[i] == 0xFFFFFFFFFFFFFFFFL) continue;
py/objtype: Remove TODO about storing attributes to classes. This behaviour is tested in basics/class_store.py and follows CPython.
@@ -1018,8 +1018,6 @@ STATIC void type_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { } else { // delete/store attribute - // TODO CPython allows STORE_ATTR to a class, but is this the correct implementation? - if (self->locals_dict != NULL) { assert(self->locals_dict->base.type == &mp_type_dict); // MicroPython restriction, for now mp_map_t *locals_map = &self->locals_dict->map;
Use generic kernels for ishama,shasum,shdot,shrot
@@ -117,16 +117,16 @@ macro(SetDefaultL1) set(SHAMAXKERNEL ../arm/amax.c) set(SHMAXKERNEL ../arm/max.c) set(SHMINKERNEL ../arm/min.c) - set(ISHAMAXKERNEL iamax.S) + set(ISHAMAXKERNEL ../arm/iamax.c) set(ISHAMINKERNEL ../arm/iamin.c) set(ISHMAXKERNEL ../arm/imax.c) set(ISHMINKERNEL ../arm/imin.c) - set(SHASUMKERNEL asum.S) + set(SHASUMKERNEL ../arm/asum.c) set(SHAXPYKERNEL ../arm/axpy.c) set(SHAXPBYKERNEL ../arm/axpby.c) set(SHCOPYKERNEL ../arm/copy.c) - set(SHDOTKERNEL dot.S) - set(SHROTKERNEL rot.S) + set(SHDOTKERNEL ../arm/dot.c) + set(SHROTKERNEL ../arm/rot.c) set(SHSCALKERNEL scal.S) set(SHNRM2KERNEL nrm2.S) set(SHSUMKERNEL sum.S)
tools: Fix gdb version check Closes
"esp32c3" ], "version_cmd": [ - "riscv32-esp-elf-gdb", + "riscv32-esp-elf-gdb-no-python", "--version" ], "version_regex": "GNU gdb \\(esp-gdb\\) ([a-z0-9.-_]+)",
Check Bashisms: Ignore `.gitignore`
@@ -14,7 +14,8 @@ find -version > /dev/null 2>&1 > /dev/null && FIND=find || FIND='find -E' # The script `check-env-dep` uses process substitution which is **not** a standard `sh` feature! # See also: https://unix.stackexchange.com/questions/151925 scripts=$($FIND scripts/ -type f -not -regex \ - '.+(/docker/.+|check-env-dep|Jenkinsfile(.daily)?|kdb_zsh_completion|sed|Vagrantfile|\.(cmake|fish|in|md|txt))$' | xargs) + '.+(/docker/.+|check-env-dep|Jenkinsfile(.daily)?|gitignore|kdb_zsh_completion|sed|Vagrantfile|\.(cmake|fish|in|md|txt))$' | \ + xargs) checkbashisms $scripts ret=$? # 2 means skipped file, e.g. README.md, that is fine
Remove -Wpedantic
###################################################### ##### Set global variables for all gst Makefiles ##### ###################################################### -CFLAGS=-std=c99 -Wall -Wextra -Wpedantic -I./include -g +CFLAGS=-std=c99 -Wall -Wextra -I./include -g PREFIX=/usr/local GST_TARGET=client/gst GST_CORELIB=core/libgst.a
Restarting coding GeneFull options: ExonOverIntron
@@ -6,8 +6,8 @@ void Transcriptome::geneFullAlignOverlap_CR(uint nA, Transcript **aAll, int32 st { readAnnot.geneFull_CR={}; - for (uint32 iA=0; iA<nA; iA++) { - Transcript &a = *aAll[iA];//one unique alignment only + for (uint32 iA=0; iA<nA; iA++) {//only includes aligns that are entirely inside genes (?) + Transcript &a = *aAll[iA]; uint64 aS = a.exons[0][EX_G]; //align start uint64 aE = a.exons[a.nExons-1][EX_G] + a.exons[a.nExons-1][EX_L]-1; //align end
keymgmt: fix coverity unchecked return value
@@ -255,9 +255,10 @@ int otherparams_to_params(const EC_KEY *ec, OSSL_PARAM_BLD *tmpl, name)) return 0; - if ((EC_KEY_get_enc_flags(ec) & EC_PKEY_NO_PUBKEY) != 0) - ossl_param_build_set_int(tmpl, params, - OSSL_PKEY_PARAM_EC_INCLUDE_PUBLIC, 0); + if ((EC_KEY_get_enc_flags(ec) & EC_PKEY_NO_PUBKEY) != 0 + && !ossl_param_build_set_int(tmpl, params, + OSSL_PKEY_PARAM_EC_INCLUDE_PUBLIC, 0)) + return 0; ecdh_cofactor_mode = (EC_KEY_get_flags(ec) & EC_FLAG_COFACTOR_ECDH) ? 1 : 0;
chat-view: limit initial scrollback to 25 msgs Provided "load backlog on-scroll" actually works, you don't really need all that much on initial load.
[[%give %fact ~ %json !>(*json)]~ this] (on-watch:def path) :: + ++ message-limit 25 + :: ++ truncated-inbox-scry ^- inbox =/ =inbox .^(inbox %gx /=chat-store/(scot %da now.bol)/all/noun) |= envelopes=(list envelope) ^- (list envelope) =/ length (lent envelopes) - ?: (lth length 100) + ?: (lth length message-limit) envelopes - (swag [(sub length 100) 100] envelopes) + (slag (sub length message-limit) envelopes) -- :: ++ on-agent
Windows ssize_t define fix
@@ -72,7 +72,16 @@ extern "C" { #define int32_t __int32 #endif +#ifndef ssize_t +#ifdef _WIN64 #define ssize_t __int64 +#elif defined _WIN32 +#define ssize_t int +#else +#error "Unknown platform!" +#endif +#endif + #define MSG_EOR 0x8 #ifndef EWOULDBLOCK #define EWOULDBLOCK WSAEWOULDBLOCK
klocwork nlog fix
@@ -690,8 +690,10 @@ load_nlog_dict_v2( } Finish: + if (parts != NULL) { FREE_POOL_SAFE(parts[0]); FREE_POOL_SAFE(parts[1]); FREE_POOL_SAFE(parts); + } return head; } \ No newline at end of file
workflows: prevent re-trigger of generation workflow on its own changes
@@ -5,6 +5,9 @@ on: push: branches: - master + # Do not re-trigger when our own PRs are merged + paths-ignore: + - codebase-structure.svg jobs: update_diagram: name: Update the codebase structure diagram @@ -17,7 +20,7 @@ jobs: uses: actions/checkout@v3 - name: Update diagram - # TODO: still not "official" enough for a proper semantic release version + # Not "official" enough for a proper semantic release version uses: githubocto/repo-visualizer@main with: excluded_paths: "ignore,.github"
sysdeps/linux: add sys_open_dir, sys_read_entries
@@ -487,6 +487,18 @@ int sys_ptrace(long req, pid_t pid, void *addr, void *data, long *out) { return 0; } +int sys_open_dir(const char *path, int *fd) { + return sys_open(path, O_DIRECTORY, 0, fd); +} + +int sys_read_entries(int handle, void *buffer, size_t max_size, size_t *bytes_read) { + auto ret = do_syscall(NR_getdents64, handle, buffer, max_size); + if(int e = sc_error(ret); e) + return e; + *bytes_read = sc_int_result<int>(ret); + return 0; +} + #endif // __MLIBC_POSIX_OPTION pid_t sys_getpid() {
ASan: Fix setup on FreeBSD
@@ -141,10 +141,10 @@ if (ENABLE_ASAN) set (EXTRA_FLAGS "${EXTRA_FLAGS} -fsanitize=integer") set (EXTRA_FLAGS "${EXTRA_FLAGS} -fsanitize-blacklist=\"${CMAKE_SOURCE_DIR}/tests/sanitizer.blacklist\"") - # in case the ubsan library exists, link it otherwise some tests will fail due to missing symbols on unix - if (UNIX AND NOT APPLE) + # In case the ubsan library exists, link it otherwise some tests will fail due to missing symbols on Linux + if (CMAKE_SYSTEM_NAME MATCHES Linux) set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lubsan") - endif (UNIX AND NOT APPLE) + endif (CMAKE_SYSTEM_NAME MATCHES Linux) endif () if (CMAKE_COMPILER_IS_GNUCXX)
Documentation change to Wifi only: remove net bit from README.md.
@@ -5,7 +5,6 @@ The Wi-Fi APIs are split into the following groups: - `<no group>`: init/deinit of the Wi-Fi API and adding a Wi-Fi instance. - `cfg`: configuration of the Wi-Fi module. -- `net`: connection to a Wi-Fi network. - `sock`: sockets, for exchanging data (but see the [common/sock](/common/sock) component for the best way to do this). - `mqtt`: MQTT client over wifi network. Refer to [common/mqtt_client](/common/mqtt_client) component for generic mqtt client implementation.
signal: correct sigset() return value & errno ref: The dispositions for SIGKILL and SIGSTOP cannot be changed.
#include <signal.h> #include <assert.h> +#include <errno.h> /**************************************************************************** * Public Functions @@ -98,9 +99,14 @@ _sa_handler_t sigset(int signo, _sa_handler_t func) { _sa_handler_t disposition; sigset_t set; - int ret; + int ret = -EINVAL; - DEBUGASSERT(GOOD_SIGNO(signo) && func != SIG_ERR); + if (signo == SIGKILL || signo == SIGSTOP || !GOOD_SIGNO(signo)) + { + goto err; + } + + DEBUGASSERT(func != SIG_ERR); sigemptyset(&set); sigaddset(&set, signo); @@ -110,7 +116,12 @@ _sa_handler_t sigset(int signo, _sa_handler_t func) if (func == SIG_HOLD) { ret = sigprocmask(SIG_BLOCK, &set, NULL); - disposition = ret < 0 ? SIG_ERR : SIG_HOLD; + if (ret < 0) + { + goto err; + } + + disposition = SIG_HOLD; } /* No.. then signal can handle the other cases */ @@ -132,10 +143,13 @@ _sa_handler_t sigset(int signo, _sa_handler_t func) */ signal(signo, disposition); - disposition = SIG_ERR; + goto err; } } } return disposition; +err: + set_errno(-ret); + return (_sa_handler_t)SIG_ERR; }
Rename bcheckAssignment2
@@ -351,7 +351,7 @@ func (q *checker) bcheckAssignment(lhs *a.Expr, op t.ID, rhs *a.Expr) error { if _, err := q.bcheckExpr(lhs, 0); err != nil { return err } - if err := q.bcheckAssignment2(lhs, lhs.MType(), op, rhs); err != nil { + if err := q.bcheckAssignment1(lhs, lhs.MType(), op, rhs); err != nil { return err } // TODO: check lhs and rhs are pure expressions. @@ -418,7 +418,7 @@ func (q *checker) bcheckAssignment(lhs *a.Expr, op t.ID, rhs *a.Expr) error { return nil } -func (q *checker) bcheckAssignment2(lhs *a.Expr, lTyp *a.TypeExpr, op t.ID, rhs *a.Expr) error { +func (q *checker) bcheckAssignment1(lhs *a.Expr, lTyp *a.TypeExpr, op t.ID, rhs *a.Expr) error { if lhs == nil && op != t.IDEq { return fmt.Errorf("check: internal error: missing LHS for op key 0x%02X", op) } @@ -885,7 +885,7 @@ func (q *checker) bcheckExprCall(n *a.Expr, depth uint32) error { lhs.MType().Str(q.tm), len(inFields), len(n.Args())) } for i, o := range n.Args() { - if err := q.bcheckAssignment2(nil, inFields[i].AsField().XType(), t.IDEq, o.AsArg().Value()); err != nil { + if err := q.bcheckAssignment1(nil, inFields[i].AsField().XType(), t.IDEq, o.AsArg().Value()); err != nil { return err } }
Fixed issue where it would send data via socket each second when managed by systemd. Fixes
@@ -1237,11 +1237,11 @@ open_term (char **buf) { /* Determine if reading from a pipe, and duplicate file descriptors so * it doesn't get in the way of curses' normal reading stdin for * wgetch() */ -static void +static FILE * set_pipe_stdin (void) { char *term = NULL; FILE *pipe = stdin; - int fd1, fd2, i; + int fd1, fd2; /* If unable to open a terminal, yet data is being piped, then it's * probably from the cron. @@ -1261,6 +1261,8 @@ set_pipe_stdin (void) { if (fileno (stdin) != 0) (void) dup2 (fileno (stdin), 0); + add_dash_filename (); + /* no need to set it as non-blocking since we are simply outputting a * static report */ if (conf.output_stdout && !conf.real_time_html) @@ -1271,24 +1273,22 @@ set_pipe_stdin (void) { FATAL ("Unable to set fd as non-blocking: %s.", strerror (errno)); out: - for (i = 0; i < logs->size; ++i) - if (logs->glog[i].filename[0] == '-' && logs->glog[i].filename[1] == '\0') - logs->glog[i].pipe = pipe; - free (term); + + return pipe; } /* Determine if we are getting data from the stdin, and where are we * outputting to. */ static void -set_io (void) { +set_io (FILE ** pipe) { /* For backwards compatibility, check if we are not outputting to a * terminal or if an output format was supplied */ if (!isatty (STDOUT_FILENO) || conf.output_format_idx > 0) conf.output_stdout = 1; /* dup fd if data piped */ if (!isatty (STDIN_FILENO)) - set_pipe_stdin (); + *pipe = set_pipe_stdin (); /* No data piped, no file was used and not loading from disk */ //if (!conf.filenames_idx && !conf.read_stdin && !conf.load_from_disk) // cmd_help (); @@ -1346,6 +1346,9 @@ block_thread_signals (void) { /* Initialize various types of data. */ static void initializer (void) { + int i; + FILE *pipe = NULL; + /* drop permissions right away */ if (conf.username) drop_permissions (); @@ -1361,16 +1364,18 @@ initializer (void) { init_geoip (); #endif - if (!isatty (STDIN_FILENO)) - add_dash_filename (); + set_io (&pipe); /* init glog */ if (!(logs = init_logs (conf.filenames_idx))) FATAL (ERR_NO_DATA_PASSED); - set_io (); set_signal_data (logs); + for (i = 0; i < logs->size; ++i) + if (logs->glog[i].filename[0] == '-' && logs->glog[i].filename[1] == '\0') + logs->glog[i].pipe = pipe; + /* init parsing spinner */ parsing_spinner = new_gspinner (); parsing_spinner->processed = &(logs->processed);
Debug message: print min and max
*/ #include "grib_api_internal.h" +#include <float.h> #ifdef ECCODES_ON_WINDOWS /* Replace C99/Unix rint() for Windows Visual C++ (only before VC++ 2013 versions) */ @@ -341,7 +342,7 @@ static void print_values(grib_context* c, const grib_util_grid_spec2* spec, { size_t i=0; int isConstant = 1; - double v = 0; + double v = 0, minVal=DBL_MAX, maxVal=-DBL_MAX; printf("ECCODES DEBUG grib_util grib_set_values: setting %lu key/value pairs\n",(unsigned long)count); for(i=0; i<count; i++) @@ -369,7 +370,16 @@ static void print_values(grib_context* c, const grib_util_grid_spec2* spec, } } } - printf("ECCODES DEBUG grib_util: data_values are CONSTANT? %d\n", isConstant); + + for (i=0; i<data_values_count; i++) { + v = data_values[i]; + if (v!=spec->missingValue) { + if (v < minVal) minVal=v; + if (v > maxVal) maxVal=v; + } + } + printf("ECCODES DEBUG grib_util: data_values are CONSTANT? %d\t(minVal=%g, maxVal=%g)\n", + isConstant, minVal, maxVal); #if 0 if (spec->bitmapPresent) {
I made a fix to FindVisItQt5 to include libQt5Concurrent in a Linux distribution.
# was separate logic for adding it to Windows and Mac, but Linux also # needs it. # +# Eric Brugger, Tue Oct 10 12:33:50 PDT 2017 +# Added Concurrent to the visit_qt_modules for Linux. Previously, +# it was only adding it for Mac, but Linux also needs it. +# #***************************************************************************** @@ -69,7 +73,7 @@ set(QT5_LIBRARIES "") set(visit_qt_modules Core Gui Widgets OpenGL Network PrintSupport Qml Svg Xml UiTools) if(LINUX) - set (visit_qt_modules ${visit_qt_modules} X11Extras) + set (visit_qt_modules ${visit_qt_modules} Concurrent X11Extras) endif() if(APPLE) @@ -155,7 +159,7 @@ if(NOT VISIT_QT_SKIP_INSTALL) Qt5::Xml ) if(LINUX) - set(qt_libs_install ${qt_libs_install} Qt5::X11Extras) + set(qt_libs_install ${qt_libs_install} Qt5::Concurrent Qt5::X11Extras) endif() if(APPLE) set(qt_libs_install ${qt_libs_install} Qt5::Concurrent)
fix accidental removal of mkl lapack
@@ -100,6 +100,7 @@ plasma-installer_%{version}/setup.py \ --fflags="${RPM_OPT_FLAGS} ${PIC_OPT}" \ --blaslib="-L/intel/mkl/lib/em64t -lmkl_intel_lp64 -lmkl_sequential -lmkl_core" \ --cblaslib="-L/intel/mkl/lib/em64t -lmkl_intel_lp64 -lmkl_sequential -lmkl_core" \ + --lapacklib="-L/intel/mkl/lib/em64t -lmkl_intel_lp64 -lmkl_sequential -lmkl_core" \ %endif --downlapc
replace FIFO36E1 with xpm_fifo_sync in axis_ram_writer
@@ -60,21 +60,22 @@ module axis_ram_writer # assign int_wlast_wire = &int_addr_reg[3:0]; assign int_rden_wire = m_axi_wready & int_wvalid_reg; - FIFO36E1 #( - .FIRST_WORD_FALL_THROUGH("TRUE"), - .ALMOST_EMPTY_OFFSET(13'd15), - .DATA_WIDTH(72), - .FIFO_MODE("FIFO36_72") + xpm_fifo_sync #( + .WRITE_DATA_WIDTH(AXIS_TDATA_WIDTH), + .FIFO_WRITE_DEPTH(512), + .READ_DATA_WIDTH(64), + .READ_MODE("fwft"), + .FIFO_READ_LATENCY(0), + .PROG_EMPTY_THRESH(15) ) fifo_0 ( - .FULL(int_full_wire), - .ALMOSTEMPTY(int_empty_wire), - .RST(~aresetn), - .WRCLK(aclk), - .WREN(int_tready_wire & s_axis_tvalid), - .DI({{(64-AXIS_TDATA_WIDTH){1'b0}}, s_axis_tdata}), - .RDCLK(aclk), - .RDEN(int_rden_wire), - .DO(int_wdata_wire) + .full(int_full_wire), + .prog_empty(int_empty_wire), + .rst(~aresetn), + .wr_clk(aclk), + .wr_en(int_tready_wire & s_axis_tvalid), + .din(s_axis_tdata), + .rd_en(int_rden_wire), + .dout(int_wdata_wire) ); always @(posedge aclk)
* Add missing flag from last commit
@@ -195,7 +195,7 @@ NTSTATUS PhMapViewOfEntireFile( status = PhCreateFileWin32( &FileHandle, FileName, - ((FILE_EXECUTE | FILE_READ_ATTRIBUTES | FILE_READ_DATA) | + ((FILE_READ_ATTRIBUTES | FILE_READ_DATA) | (!ReadOnly ? (FILE_APPEND_DATA | FILE_WRITE_ATTRIBUTES | FILE_WRITE_DATA) : 0)) | SYNCHRONIZE, 0, FILE_SHARE_READ,
Update README.md for IBM Watson IoT Platform Update README.md to show how to enable TLS optional to use IBM Watson IoT Platform for cc26xx-web-demo
@@ -166,3 +166,9 @@ the state of the LED. Bear in mind that, even though the topic suggests that messages are of json format, they are in fact not. This was done in order to avoid linking a json parser into the firmware. + +IBM Watson IoT Platform +---------------------------- +To use IBM Watson IoT Platform, you have to go to SECURITY tab of Device page to select "TLS Optional". This step is critical. If you don't do this, you need to use TLS for connection and default cc26xx-web-demo won't work. + +![IBM Watson IoT Platform TLS Optional Configuration](img/ibm-watson-iot-platform-tls-optional.png)
nvbios: Add INIT_ZM_ALTERNATING16_I2CREG devinit opcode (0xB3) Write a set of new word values to a set of I2C registers (zero mask). This opcode causes a given number of registers in a device to be written with specified values through a given I2C port. Seen on [core86,) e.g. Turing. Source:
@@ -816,6 +816,17 @@ void printscript (uint16_t soff) { printf ("UNKB2\n"); soff += 22; break; + case 0xb3: + printcmd (soff, 4); + printf ("ZM_ALTERNATING16_I2CREG\tI2C[0x%02x][0x%02x]\n", bios->data[soff+1], bios->data[soff+2]); + cnt = bios->data[soff+3]; + soff += 4; + while (cnt--) { + printcmd (soff, 3); + printf ("\t[0x%02x] = 0x%04x\n", bios->data[soff], le16(soff+1)); + soff += 3; + } + break; default: printcmd (soff, 1); printf ("???\n");
derivatives in for distrot+nbody, but have a seg fault
@@ -240,7 +240,7 @@ void VerifyOrbitData(BODY *body,CONTROL *control,OPTIONS *options,int iBody) { iLine = 0; while (feof(fileorb) == 0) { - fscanf(fileorb, "%lf %lf %lf %lf %lf %lf %lf", &dttmp, &datmp, &detmp, &ditmp, &daptmp, &dlatmp, &dmatmp); + fscanf(fileorb, "%lf %lf %lf %lf %lf %lf %lf", &dttmp, &datmp, &detmp, &ditmp, &dlatmp, &daptmp, &dmatmp); body[iBody].daTimeSeries[iLine] = dttmp*fdUnitsTime(control->Units[iBody+1].iTime); body[iBody].daSemiSeries[iLine] = datmp*fdUnitsLength(control->Units[iBody+1].iLength); body[iBody].daEccSeries[iLine] = detmp; @@ -370,7 +370,8 @@ void InitializeUpdateDistRot(BODY *body,UPDATE *update,int iBody) { if (iBody > 0) { if (body[iBody].bReadOrbitData) { body[iBody].iGravPerts = 0; - update[iBody].iNumZobl += 1; + body[iBody].iaGravPerts = malloc(1*sizeof(int)); + body[iBody].iaGravPerts[0] = 0; } if (update[iBody].iNumXobl == 0) @@ -389,6 +390,9 @@ void InitializeUpdateDistRot(BODY *body,UPDATE *update,int iBody) { update[iBody].iNumXobl += 1; update[iBody].iNumYobl += 1; } + if (body[iBody].bReadOrbitData) { + update[iBody].iNumZobl += 1; + } } }
Fix issue that tc_pthread_once fail when run tc repeatly g_once was not intialized when tc start. Now g_once is initialized to PTHREAD_ONCE_INIT
@@ -59,7 +59,7 @@ pthread_t thread[PTHREAD_CNT]; pthread_mutex_t g_mutex = PTHREAD_MUTEX_INITIALIZER; pthread_cond_t g_cond; pthread_key_t g_tlskey; -static pthread_once_t g_once = PTHREAD_ONCE_INIT; +static pthread_once_t g_once; static bool g_bpthreadcallback = false; static int g_cnt; @@ -1182,6 +1182,10 @@ static void tc_pthread_pthread_once(void) { int ret_chk; + /* Initialize g_once */ + + g_once = PTHREAD_ONCE_INIT; + /* Test NULL case */ g_bpthreadcallback = false;
Fix test_psa_crypto_config_accel_hash_use_psa build when including libtestdriver1 PSA headers from programs
@@ -1913,7 +1913,7 @@ component_test_psa_crypto_config_accel_hash_use_psa () { # but is already disabled in the default config loc_accel_flags="$loc_accel_flags $( echo "$loc_accel_list" | sed 's/[^ ]* */-DMBEDTLS_PSA_ACCEL_&/g' )" - make CFLAGS="$ASAN_CFLAGS -Werror -I../tests/include -I../tests -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_TEST_LIBTESTDRIVER1 $loc_accel_flags" LDFLAGS="-ltestdriver1 $ASAN_CFLAGS" tests + make CFLAGS="$ASAN_CFLAGS -Werror -I../tests/include -I../tests -I../../tests -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_TEST_LIBTESTDRIVER1 $loc_accel_flags" LDFLAGS="-ltestdriver1 $ASAN_CFLAGS" all # There's a risk of something getting re-enabled via config_psa.h; # make sure it did not happen.
Add Proper usage of pattern to UIColor and remove unnecessary functions and code
@@ -224,7 +224,7 @@ rgb hsv2rgb(hsv in) { @public enum BrushType _type; UIImage* _image; - id _pattern; + woc::StrongCF<CGPatternRef> _pattern; __CGColorQuad _components; // Note: This should be part of the CGColor struct woc::StrongCF<CGColorSpaceRef> _colorSpace; @@ -509,22 +509,7 @@ rgb hsv2rgb(hsv in) { return nil; } -#if 0 -if ( bounds.size.width < 256 || bounds.size.height < 256 ) { -m = CGAffineTransformMakeTranslation(0, 0); -CGPatternCallbacks callbacks; - -callbacks.version = 0; -callbacks.releaseInfo = 0; -callbacks.drawPattern = __UIColorPatternFill; - -_pattern = (id) CGPatternCreateColorspace(self, bounds, m, bounds.size.width, bounds.size.height, 0, NO, &callbacks, pImg->_has32BitAlpha ? _ColorABGR : _ColorBGR); -} else { -_pattern = (id) _CGPatternCreateFromImage(pImg); -} -#else - _pattern = (id)_CGPatternCreateFromImage(pImg); -#endif + _pattern = _CGPatternCreateFromImage(pImg); _image = [image retain]; _type = cgPatternBrush; @@ -563,7 +548,7 @@ _pattern = (id) _CGPatternCreateFromImage(pImg); UIColor* ret = [self alloc]; ret->_type = cgPatternBrush; - ret->_pattern = [(id)pattern retain]; + ret->_pattern = pattern; return [ret autorelease]; } @@ -583,7 +568,7 @@ _pattern = (id) _CGPatternCreateFromImage(pImg); UIColor* ret = [self alloc]; ret->_type = copyclr->_type; - ret->_pattern = [copyclr->_pattern retain]; + ret->_pattern = copyclr->_pattern; ret->_components.r = copyclr->_components.r; ret->_components.g = copyclr->_components.g; ret->_components.b = copyclr->_components.b; @@ -604,7 +589,7 @@ _pattern = (id) _CGPatternCreateFromImage(pImg); UIColor* ret = [self alloc]; ret->_type = copyclr->_type; - ret->_pattern = [copyclr->_pattern retain]; + ret->_pattern = copyclr->_pattern; ret->_components.r = copyclr->_components.r; ret->_components.g = copyclr->_components.g; ret->_components.b = copyclr->_components.b; @@ -642,10 +627,6 @@ _pattern = (id) _CGPatternCreateFromImage(pImg); return _type; } -- (CGImageRef)getPatternImage { - return (CGImageRef)[_pattern getPatternImage]; -} - /** @Status Interoperable */ @@ -779,7 +760,6 @@ _pattern = (id) _CGPatternCreateFromImage(pImg); */ - (void)dealloc { [_image release]; - [_pattern release]; [super dealloc]; } @@ -845,6 +825,6 @@ DWORD _UIColorPatternFill(UIColor* color, CGContextRef ctx) { CGRect bounds = { 0 }; bounds.size = [color->_image size]; - CGContextDrawImage(ctx, bounds, (CGImageRef)[color->_image CGImage]); + CGContextDrawImage(ctx, bounds, static_cast<CGImageRef>([color->_image CGImage])); return 0; }
[net][sal] Remove SAL_USING_POSIX dependence for lwIP stack.
#error "POSIX poll/select, stdin need file system(RT_USING_DFS) and device file system(RT_USING_DFS_DEVFS)" #endif -#if defined(RT_USING_LWIP) && !defined(SAL_USING_POSIX) -#error "POSIX poll/select, stdin need file BSD socket API(SAL_USING_POSIX)" -#endif - #if !defined(RT_USING_LIBC) #error "POSIX layer need standard C library(RT_USING_LIBC)" #endif
Modify argument name to avoid ambiguity
@@ -554,12 +554,12 @@ extern esp_t esp; esp_mem_free_s((void **)&(name)); \ } while (0) #if ESP_CFG_USE_API_FUNC_EVT -#define ESP_MSG_VAR_SET_EVT(name, evt_fn, evt_arg) do {\ - (name)->evt_fn = (evt_fn); \ - (name)->evt_arg = (evt_arg); \ +#define ESP_MSG_VAR_SET_EVT(name, e_fn, e_arg) do {\ + (name)->evt_fn = (e_fn); \ + (name)->evt_arg = (e_arg); \ } while (0) #else /* ESP_CFG_USE_API_FUNC_EVT */ -#define ESP_MSG_VAR_SET_EVT(name, evt_fn, evt_arg) do { ESP_UNUSED(evt_fn); ESP_UNUSED(evt_arg); } while (0) +#define ESP_MSG_VAR_SET_EVT(name, e_fn, e_arg) do { ESP_UNUSED(e_fn); ESP_UNUSED(e_arg); } while (0) #endif /* !ESP_CFG_USE_API_FUNC_EVT */ #define ESP_CHARISNUM(x) ((x) >= '0' && (x) <= '9')
kukui: Disable MFALLOW and TYPEC console commands Disable CONFIG_CMD_MFALLOW and CONFIG_CMD_TYPEC commands to free up RO flash space on kukui boards. TEST=Build all BRANCH=None
#undef CONFIG_CMD_CRASH #undef CONFIG_CMD_HCDEBUG #undef CONFIG_CMD_IDLE_STATS +#undef CONFIG_CMD_MFALLOW #undef CONFIG_CMD_MMAPINFO #undef CONFIG_CMD_PWR_AVG #undef CONFIG_CMD_REGULATOR #undef CONFIG_CMD_SLEEPMASK #undef CONFIG_CMD_SLEEPMASK_SET #undef CONFIG_CMD_SYSLOCK +#undef CONFIG_CMD_TYPEC #undef CONFIG_HOSTCMD_FLASHPD #undef CONFIG_HOSTCMD_RWHASHPD #undef CONFIG_CONSOLE_CMDHELP
Removed sudo for compilation
@@ -33,10 +33,12 @@ install: - cmake --version - python --version script: -- python setup.py build -- nosetests tests/run_tests.py --all --debug --detailed-errors --verbose --process-restartworker --with-coverage --cover-package=pyccl +- make -Cbuild - sudo make -Cbuild install - check_ccl +- python setup.py build +- nosetests tests/run_tests.py --all --debug --detailed-errors --verbose --process-restartworker --with-coverage --cover-package=pyccl + after_success: - coveralls deploy:
workflow/backup: password protect
#include <ui/screen_stack.h> #include <workflow/backup.h> #include <workflow/confirm.h> +#include <workflow/password_enter.h> #include <workflow/sdcard.h> #include <workflow/status.h> +#include <workflow/unlock.h> #define MAX_EAST_UTC_OFFSET (50400) // 14 hours in seconds #define MAX_WEST_UTC_OFFSET (-43200) // 12 hours in seconds @@ -106,6 +108,18 @@ bool workflow_backup_create(const CreateBackupRequest* request) }; sdcard_handle(&sd); + if (!workflow_confirm("", "I understand that\nthe backup is NOT\npassword protected", false)) { + return false; + } + + char password[SET_PASSWORD_MAX_PASSWORD_LENGTH] = {0}; + password_enter("Unlocking device\nrequired", password); + keystore_error_t unlock_result = workflow_unlock_and_handle_error(password); + util_zero(password, sizeof(password)); + if (unlock_result != KEYSTORE_OK) { + return false; + } + if (!_confirm_time(request)) { return false; }
Ensure the _check functions take parse text as char not XML_Char _run_character_check() et al pass their parse text to XML_Parse() via _XML_Parse_SINGLE_BYTES(). Both of these expect the parse text as "const char *", not "const XML_Char *".
@@ -579,7 +579,7 @@ accumulate_attribute(void *userData, const XML_Char *UNUSED_P(name), static void -_run_character_check(const XML_Char *text, const XML_Char *expected, +_run_character_check(const char *text, const XML_Char *expected, const char *file, int line) { CharData storage; @@ -596,7 +596,7 @@ _run_character_check(const XML_Char *text, const XML_Char *expected, _run_character_check(text, expected, __FILE__, __LINE__) static void -_run_attribute_check(const XML_Char *text, const XML_Char *expected, +_run_attribute_check(const char *text, const XML_Char *expected, const char *file, int line) { CharData storage; @@ -626,7 +626,7 @@ ext_accumulate_characters(void *userData, const XML_Char *s, int len) } static void -_run_ext_character_check(const XML_Char *text, +_run_ext_character_check(const char *text, ExtTest *test_data, const XML_Char *expected, const char *file, int line)
parallel-libs/opencoarrays: fix patch formatting
--- a/src/tests/unit/teams/CMakeLists.txt 2018-08-10 09:01:51.000000000 -0500 -+++ b/src/tests/unit/teams/CMakeLists.txt2018-10-26 17:02:12.963100898 -0500 ++++ b/src/tests/unit/teams/CMakeLists.txt 2018-10-26 17:21:11.478962894 -0500 caf_compile_executable(team_number team-number.f90) -caf_compile_executable(get_communicator get-communicator.f90)
toggle scratchpad with super+shift+s
@@ -5174,6 +5174,11 @@ void createscratchpad(const Arg *arg) { return; c = selmon->sel; + if (c->tags == 1 << 20) { + tag(&((Arg){.ui = 1 << ( selmon->pertag->curtag -1 )})); + return; + } + c->tags = 1 << 20; c->issticky = selmon->scratchvisible; if (!c->isfloating)
edit diff BUGFIX edit same leaf with different value It is properly forbidden now.
@@ -2543,11 +2543,11 @@ sr_edit_add_check_same_node_op(sr_session_ctx_t *session, const char *xpath, con /* find the node */ set = lyd_find_path(session->dt[session->ds].edit, uniq_xpath); free(uniq_xpath); - if (!set || (set->number != 1)) { + if (!set || (set->number > 1)) { ly_set_free(set); SR_ERRINFO_INT(&err_info); return err_info; - } + } else if (set->number == 1) { node = set->set.d[0]; ly_set_free(set); @@ -2556,7 +2556,9 @@ sr_edit_add_check_same_node_op(sr_session_ctx_t *session, const char *xpath, con /* same node with same operation, silently ignore and clear the error */ ly_err_clean(session->conn->ly_ctx, NULL); return NULL; - } + } /* else node has a different operation, error */ + } /* else set->number == 0; it must be leaf and there already is one with another value, error */ + ly_set_free(set); } sr_errinfo_new_ly(&err_info, session->conn->ly_ctx);
sockeye: update xeon phi description
@@ -87,11 +87,14 @@ module XEONPHI { memory (0 bits 40) SMPT_IN SMPT_IN blockoverlays OUT bits(34) // SMPT remaps in 16GB blocks + memory (0 bits 16) MMIO + MMIO accepts [(*)] + memory (0 bits 40) KNC_SOCKET KNC_SOCKET maps [ - (0x0000000000 to 0x00fedfffff) to GDDR at (0x000000000 to 0x0fedfffff); - (0x00fee01000 to 0x03ffffffff) to GDDR at (0x0fee01000 to 0x3ffffffff); - (0x0800000000 to 0xffffffffff) to SMPT_IN at (0x0 to 0xf7ffffffff) // 512GB + (0x0000000000 to 0x03ffffffff) to GDDR at (0x000000000 to 0x03ffffffff); + (0x8000000000 to 0xffffffffff) to SMPT_IN at (0x0 to 0x7fffffffff); // 512GB + (0x08007D0000 bits 16) to MMIO at (*) ] memory (0 bits 40) LAPIC
stress using a new line.
@@ -18,7 +18,9 @@ You can read more about [facil.io](http://facil.io) on the [facil.io](http://fac However, when starting a new project, it's often easiest to simply fork this project and place your own source code in the `dev` folder, perhaps updating the `makefile` to make it more compatible with your project's folder structure. -When forking this project, please run `make clean` to build the `tmp` folder structure used for compiling. Unless `make clean` is called, the compiler / linker will fail with a `No such file or directory` error. +When forking this project, please run `make clean` to build the `tmp` folder structure used for compiling. + +Unless `make clean` is called, the compiler / linker will fail with a `No such file or directory` error. ## Three Quick Examples
test: fix coverity & resource leak
@@ -208,12 +208,14 @@ static int test_lib(void) fprintf(stderr, "Failed to close libcrypto\n"); goto end; } + cryptolib = SD_INIT; if (test_type == CRYPTO_FIRST || test_type == SSL_FIRST) { if (!sd_close(ssllib)) { fprintf(stderr, "Failed to close libssl\n"); goto end; } + ssllib = SD_INIT; } # if defined(OPENSSL_NO_PINSHARED) \ @@ -235,6 +237,10 @@ static int test_lib(void) result = 1; end: + if (cryptolib != SD_INIT) + sd_close(cryptolib); + if (ssllib != SD_INIT) + sd_close(ssllib); return result; } #endif
chacha/asm/chacha-ppc.pl: fix big-endian build. It's kind of a "brown-bag" bug, as I did recognize the problem and verified an ad-hoc solution, but failed to follow up with cross-checks prior filing previous merge request.
@@ -438,9 +438,9 @@ my ($a,$b,$c,$d)=@_; "&vxor ('$b','$b','$c')", "&vrlw ('$b','$b','$seven')", - "&vsldoi ('$c','$c','$c',8)", - "&vsldoi ('$b','$b','$b',$odd?4:12)", - "&vsldoi ('$d','$d','$d',$odd?12:4)" + "&vrldoi ('$c','$c',8)", + "&vrldoi ('$b','$b',$odd?4:12)", + "&vrldoi ('$d','$d',$odd?12:4)" ); } @@ -1334,11 +1334,12 @@ foreach (split("\n",$code)) { s/\?lvsr/lvsl/ or s/\?lvsl/lvsr/ or s/\?(vperm\s+v[0-9]+,\s*)(v[0-9]+,\s*)(v[0-9]+,\s*)(v[0-9]+)/$1$3$2$4/ or - s/(vsldoi\s+v[0-9]+,\s*)(v[0-9]+,)\s*(v[0-9]+,\s*)([0-9]+)/$1$3$2 16-$4/; + s/vrldoi(\s+v[0-9]+,\s*)(v[0-9]+,)\s*([0-9]+)/vsldoi$1$2$2 16-$3/; } else { # little-endian s/le\?// or s/be\?/#be#/ or - s/\?([a-z]+)/$1/; + s/\?([a-z]+)/$1/ or + s/vrldoi(\s+v[0-9]+,\s*)(v[0-9]+,)\s*([0-9]+)/vsldoi$1$2$2 $3/; } print $_,"\n";
usb_mux: Simplify logging to reduce code size BRANCH=none TEST=make buildall Commit-Ready: Philip Chen Tested-by: Philip Chen
@@ -24,7 +24,7 @@ void usb_mux_init(int port) ASSERT(port >= 0 && port < CONFIG_USB_PD_PORT_COUNT); res = mux->driver->init(mux->port_addr); if (res) - CPRINTS("Error initializing mux port(%d): %d", port, res); + CPRINTS("Err: init mux port(%d): %d", port, res); /* Apply board specific initialization */ if (mux->board_init) @@ -51,7 +51,7 @@ void usb_mux_set(int port, enum typec_mux mux_mode, mux_state = polarity ? mux_mode | MUX_POLARITY_INVERTED : mux_mode; res = mux->driver->set(mux->port_addr, mux_state); if (res) { - CPRINTS("Error setting mux port(%d): %d", port, res); + CPRINTS("Err: set mux port(%d): %d", port, res); return; } @@ -70,7 +70,7 @@ int usb_mux_get(int port, const char **dp_str, const char **usb_str) res = mux->driver->get(mux->port_addr, &mux_state); if (res) { - CPRINTS("Error getting mux port(%d): %d", port, res); + CPRINTS("Err: get mux port(%d): %d", port, res); return 0; } @@ -91,7 +91,7 @@ void usb_mux_flip(int port) res = mux->driver->get(mux->port_addr, &mux_state); if (res) { - CPRINTS("Error getting mux port(%d): %d", port, res); + CPRINTS("Err: get mux port(%d): %d", port, res); return; } @@ -102,7 +102,7 @@ void usb_mux_flip(int port) res = mux->driver->set(mux->port_addr, mux_state); if (res) - CPRINTS("Error setting mux port(%d): %d", port, res); + CPRINTS("Err: set mux port(%d): %d", port, res); } #ifdef CONFIG_CMD_TYPEC
Get rid of warning on BSDs.
@@ -59,6 +59,12 @@ extern char **environ; #include <mach/mach.h> #endif +/* Setting C99 standard makes this not available, but it should + * work/link properly if we detect a BSD */ +#if defined(JANET_BSD) || defined(JANET_APPLE) +void arc4random_buf(void *buf, size_t nbytes); +#endif + #endif /* JANET_REDCUED_OS */ /* Core OS functions */ @@ -551,7 +557,6 @@ static Janet os_cryptorand(int32_t argc, Janet *argv) { RETRY_EINTR(rc, close(randfd)); #elif defined(JANET_BSD) || defined(JANET_APPLE) (void) genericerr; - arc4random_buf(buffer->data + offset, n); #else (void) genericerr;
Improve cmake_build, supports the specified config and target
@@ -593,7 +593,16 @@ end -- do build for cmake/build function _build_for_cmakebuild(package, configs, opt) local cmake = assert(find_tool("cmake"), "cmake not found!") - os.vrunv(cmake.program, {"--build", os.curdir()}, {envs = opt.envs or buildenvs(package)}) + local argv = {"--build", os.curdir()} + if opt.config then + table.insert(argv, "--config") + table.insert(argv, opt.config) + end + if opt.target then + table.insert(argv, "--target") + table.insert(argv, opt.target) + end + os.vrunv(cmake.program, argv, {envs = opt.envs or buildenvs(package)}) end -- do install for msvc @@ -662,7 +671,12 @@ end function _install_for_cmakebuild(package, configs, opt) opt = opt or {} local cmake = assert(find_tool("cmake"), "cmake not found!") - os.vrunv(cmake.program, {"--build", os.curdir()}, {envs = opt.envs or buildenvs(package)}) + local argv = {"--build", os.curdir()} + if opt.config then + table.insert(argv, "--config") + table.insert(argv, opt.config) + end + os.vrunv(cmake.program, argv, {envs = opt.envs or buildenvs(package)}) os.vrunv(cmake.program, {"--install", os.curdir()}) end
fix: closes send empty reqbody instead of NULL pointer
@@ -134,10 +134,12 @@ del(client *client, const uint64_t channel_id, dati *p_channel) .ok_obj = p_channel, }; + struct sized_buffer req_body = {"", 0}; + user_agent::run( &client->ua, &resp_handle, - NULL, + &req_body, //empty POSTFIELDS HTTP_DELETE, "/channels/%llu", channel_id); }
Prepare debian changelog for v0.8.0 tag debian changelog for v0.8.0 tag
+bcc (0.8.0-1) unstable; urgency=low + + * Support for kernel up to 5.0 + + -- Brenden Blanco <[email protected]> Fri, 11 Jan 2019 17:00:00 +0000 + bcc (0.7.0-1) unstable; urgency=low * Support for kernel up to 4.18
Update: Optimizations the profiler revealed
@@ -63,11 +63,12 @@ static Decision Cycle_ProcessSensorimotorEvent(Event *e, long currentTime) Event_SetTerm(e, e->term); // TODO make sure that hash needs to be calculated once instead already IN_DEBUG( puts("Event was selected:"); Event_Print(e); ) //determine the concept it is related to + bool e_hasVariable = Variable_hasVariable(&e->term, true, true, true); Event ecp = *e; for(int concept_i=0; concept_i<concepts.itemsAmount; concept_i++) { Concept *c = concepts.items[concept_i].address; - if(!Variable_hasVariable(&e->term, true, true, true)) //concept matched to the event which doesn't have variables + if(!e_hasVariable) //concept matched to the event which doesn't have variables { Substitution subs = Variable_Unify(&c->term, &e->term); //concept with variables, if(subs.success) @@ -310,12 +311,14 @@ void Cycle_ProcessInputBeliefEvents(long currentTime) void Cycle_ProcessInputGoalEvents(long currentTime) { //process goals + bool hadGoal = false; Decision decision[PROPAGATION_ITERATIONS + 1] = {0}; if(goal_events.itemsAmount > 0) { Event *goal = FIFO_GetNewestSequence(&goal_events, 0); if(!goal->processed && goal->type!=EVENT_TYPE_DELETED) { + hadGoal = true; assert(goal->type == EVENT_TYPE_GOAL, "A different event type made it into goal events!"); decision[0] = Cycle_ProcessSensorimotorEvent(goal, currentTime); //allow reasoning into the future by propagating spikes from goals back to potential current events @@ -325,6 +328,10 @@ void Cycle_ProcessInputGoalEvents(long currentTime) } } } + if(!hadGoal) + { + return; + } //inject the best action if there was one Decision best_decision = {0}; for(int i=0; i<PROPAGATION_ITERATIONS+1; i++) @@ -342,8 +349,8 @@ void Cycle_ProcessInputGoalEvents(long currentTime) for(int i=0; i<concepts.itemsAmount; i++) { Concept *c = concepts.items[i].address; - c->incoming_goal_spike = (Event) {0}; - c->goal_spike = (Event) {0}; + c->incoming_goal_spike.type = EVENT_TYPE_DELETED; + c->goal_spike.type = EVENT_TYPE_DELETED; } }
Don't print to stderr in Makefile to detect version. Fix
@@ -27,7 +27,7 @@ PREFIX?=/usr/local INCLUDEDIR?=$(PREFIX)/include BINDIR?=$(PREFIX)/bin LIBDIR?=$(PREFIX)/lib -JANET_BUILD?="\"$(shell git log --pretty=format:'%h' -n 1 || echo local)\"" +JANET_BUILD?="\"$(shell git log --pretty=format:'%h' -n &>2 /dev/null || echo local)\"" CLIBS=-lm -lpthread JANET_TARGET=build/janet JANET_LIBRARY=build/libjanet.so
max payne 1 - second camera overlay fix
@@ -547,8 +547,9 @@ DWORD WINAPI Init(LPVOID bDelay) Screen.bDrawBordersForCameraOverlay = false; *(uint8_t*)(regs.edi + 0x14E) = 1; - //what happens here is check for some camera coordinates, in this particular cutscene 1.81 is used https://i.imgur.com/A7wRrgk.gifv - if ((*(uint32_t*)(regs.esp + 0x10) == 0x3FE842CF && *(uint32_t*)(regs.esp + 0x1C) == 0x3FE842CF)) //1.81 + //what happens here is check for some camera coordinates or angles + if ((*(uint32_t*)(regs.esp + 0x10) == 0x3FE842CF && *(uint32_t*)(regs.esp + 0x1C) == 0x3FE842CF) || //1.81 https://i.imgur.com/A7wRrgk.gifv + (*(uint32_t*)(regs.esp + 0x10) == 0x3FC00000 && *(uint32_t*)(regs.esp + 0x1C) == 0x3FC00000 && *(uint32_t*)(regs.esp + 0x14) == 0x4096BEF4 && *(uint32_t*)(regs.esp + 0x18) == 0xC003936E)) //1.5 https://i.imgur.com/ouRpysL.jpg Screen.bDrawBordersForCameraOverlay = true; } }; injector::MakeInline<CameraOverlayHook>(pattern.get_first(0), pattern.get_first(7)); // 0x672EB1
Clean up formatting of error reporting.
@@ -404,8 +404,8 @@ void putucon(Stab *st, Ucon *uc) old = getucon(st, uc->name); if (old) - lfatal(old->loc, "`%s already defined on %s:%d", namestr(uc->name), fname(uc->loc), - lnum(uc->loc)); + lfatal(old->loc, "`%s already defined on %s:%d", + namestr(uc->name), fname(uc->loc), lnum(uc->loc)); setns(uc->name, st->name); htput(st->uc, uc->name, uc); } @@ -430,12 +430,12 @@ void puttrait(Stab *st, Node *n, Trait *c) st = findstab(st, n); t = gettrait(st, n); if (t && !mergetrait(t, c)) - fatal(n, "Trait %s already defined on %s:%d", namestr(n), fname(t->loc), - lnum(t->loc)); + fatal(n, "Trait %s already defined on %s:%d", + namestr(n), fname(t->loc), lnum(t->loc)); ty = gettype(st, n); if (ty) - fatal(n, "Trait %s defined as a type on %s:%d", namestr(n), fname(ty->loc), - lnum(ty->loc)); + fatal(n, "Trait %s defined as a type on %s:%d", + namestr(n), fname(ty->loc), lnum(ty->loc)); td = xalloc(sizeof(Traitdefn)); td->loc = n->loc; td->name = n; @@ -474,9 +474,11 @@ void putimpl(Stab *st, Node *n) impl = getimpl(st, n); if (impl && !mergeimpl(impl, n)) fatal(n, "Trait %s already implemented over %s at %s:%d", - namestr(n->impl.traitname), tystr(n->impl.type), fname(n->loc), lnum(n->loc)); + namestr(n->impl.traitname), tystr(n->impl.type), + fname(n->loc), lnum(n->loc)); /* - * The impl is not defined in this file, so setting the trait name would be a bug here. + The impl is not defined in this file, so setting the + trait name would be a bug here. */ setns(n->impl.traitname, st->name); htput(st->impl, n, n);
Fix resetting of sequence number length.
@@ -247,7 +247,7 @@ owerror_t openoscoap_protect_message( xor_arrays(nonce, partialIV, nonce, AES_CCM_16_64_128_IV_LEN); // do not encode sequence number and ID in the response requestSeq = NULL; - requestSeq = 0; + requestSeqLen = 0; requestKid = NULL; requestKidLen = 0; }
fix leftover overlay pointer
@@ -5289,8 +5289,13 @@ unmanage(Client *c, int destroyed) { Monitor *m = c->mon; XWindowChanges wc; - if (c == selmon->overlay) - selmon->overlay = NULL; + if (c == selmon->overlay) { + Monitor *tm; + for (tm = mons; tm; tm = tm->next) { + tm->overlay = NULL; + } + } + detach(c); detachstack(c);
Readd back 'uip_stat' if UIP_STATISTICS is enabled
#define LOG_MODULE "IPv6" #define LOG_LEVEL LOG_LEVEL_IPV6 +#if UIP_STATISTICS == 1 +struct uip_stats uip_stat; +#endif /* UIP_STATISTICS == 1 */ + /*---------------------------------------------------------------------------*/ /** * \name Layer 2 variables
Pass VP matrix to shader.
@@ -33,8 +33,8 @@ float ChipmunkDebugDrawOutlineWidth = 1.0f; #define GLSL33(x) "#version 330\n" #x -static sg_pipeline pip; -static sg_bindings bind; +static sg_pipeline pipeline; +static sg_bindings bindings; static sg_pass_action pass_action; typedef struct {float x, y;} float2; @@ -42,6 +42,11 @@ typedef struct {uint8_t r, g, b, a;} RGBA8; typedef struct {float radius; float2 position; float2 uv; RGBA8 color;} Vertex; typedef uint16_t Index; +typedef struct { + float U_vp_matrix[16]; +} Uniforms; + + // Meh, just max out 16 bit index size. #define VERTEX_MAX (64*1024) #define INDEX_MAX (128*1024) @@ -79,26 +84,33 @@ ChipmunkDebugDrawInit(void) .usage = SG_USAGE_STREAM, }); - bind = (sg_bindings){ + bindings = (sg_bindings){ .vertex_buffers[0] = vertex_buffer, .index_buffer = index_buffer, }; sg_shader shd = sg_make_shader(&(sg_shader_desc){ + .vs.uniform_blocks[0] = { + .size = sizeof(Uniforms), + .uniforms = { + [0] = {.name = "U_vp_matrix", .type = SG_UNIFORMTYPE_MAT4}, + } + }, .vs.source = GLSL33( layout(location = 0) in float IN_radius; - layout(location = 1) in vec4 IN_position; + layout(location = 1) in vec2 IN_position; layout(location = 2) in vec2 IN_uv; layout(location = 3) in vec4 IN_color; + uniform mat4 U_vp_matrix; + out struct { vec2 uv; vec4 color; } FRAG; void main(){ - gl_Position = IN_position; - gl_Position.xy += IN_radius*IN_uv; + gl_Position = U_vp_matrix*vec4(IN_position + IN_radius*IN_uv, 0, 1); FRAG.uv = IN_uv; FRAG.color = IN_color; } @@ -119,7 +131,7 @@ ChipmunkDebugDrawInit(void) ), }); - pip = sg_make_pipeline(&(sg_pipeline_desc){ + pipeline = sg_make_pipeline(&(sg_pipeline_desc){ .shader = shd, .blend = { .enabled = true, @@ -376,12 +388,22 @@ ChipmunkDebugDrawFlushRenderer(int pass_width, int pass_height) { sg_begin_default_pass(&pass_action, pass_width, pass_height); - sg_apply_pipeline(pip); - sg_apply_bindings(&bind); + sg_apply_pipeline(pipeline); + sg_apply_bindings(&bindings); sg_update_buffer(vertex_buffer, Vertexes, vertex_count*sizeof(Vertex)); sg_update_buffer(index_buffer, Indexes, index_count*sizeof(Index)); - sg_draw(0, 6, 1); + + Uniforms uniforms = { + .U_vp_matrix = { + 2, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1, + }, + }; + sg_apply_uniforms(SG_SHADERSTAGE_VS, 0, &uniforms, sizeof(Uniforms)); + sg_draw(0, index_count, 1); sg_end_pass(); sg_commit();
samples: hssi: print rx_count Add the rx_count register to the list of registers printed out at the end of the program. Wait until the packets have been sent before printing the register contents.
#define CSR_DST_ADDR_HI 0x1012 #define CSR_SRC_ADDR_LO 0x1013 #define CSR_SRC_ADDR_HI 0x1014 +#define CSR_RX_COUNT 0x1015 #define CSR_MLB_RST 0x1016 #define CSR_TX_COUNT 0x1017 @@ -199,8 +200,6 @@ public: hafu->mbox_write(CSR_CTRL1, reg); - print_registers(std::cout, hafu); - uint32_t count; const uint64_t interval = 100ULL; do @@ -215,6 +214,8 @@ public: std::this_thread::sleep_for(std::chrono::microseconds(interval)); } while(count < num_packets_); + print_registers(std::cout, hafu); + std::cout << std::endl; if (eth_ifc == "") { @@ -272,6 +273,8 @@ public: int_to_hex(hafu->mbox_read(CSR_SRC_ADDR_LO)) << std::endl; os << "0x1014 " << std::setw(22) << "src_addr_hi" << ": " << int_to_hex(hafu->mbox_read(CSR_SRC_ADDR_HI)) << std::endl; + os << "0x1015 " << std::setw(22) << "rx_count" << ": " << + int_to_hex(hafu->mbox_read(CSR_RX_COUNT)) << std::endl; os << "0x1016 " << std::setw(22) << "mlb_rst" << ": " << int_to_hex(hafu->mbox_read(CSR_MLB_RST)) << std::endl; os << "0x1017 " << std::setw(22) << "tx_count" << ": " <<
Update EBNF grammar (typealias and more) Adds the typealias syntax to the EBNF syntax in the manual and also updates other things that were out of date in the EBNF grammar. Fixes
@@ -363,29 +363,38 @@ local x2 : integer = ns[4] -- run-time error Here is the complete syntax of Pallene in extended BNF. As usual, {A} means 0 or more As, and \[A\] means an optional A. - program ::= {toplevelrecord} {toplevelvar} {toplevelfunc} + program ::= {toplevelrecord | topleveltypealias | toplevelvar | toplevelfunc} toplevelrecord ::= record Name {recordfield} end recordfield ::= NAME ':' type [';'] + topleveltypealias ::= typealias NAME = type + toplevelvar ::= local NAME [':' type] {',' NAME [':' type]} '=' explist - toplevelfunc ::= [local] function NAME '(' [paramlists] ')' [':' typelist ] block end + toplevelfunc ::= [local] function NAME '(' [paramlist] ')' [':' typelist ] block end paramlist ::= NAME ':' type {',' NAME ':' type} - type ::= nil | integer | float | boolean | string | any | '{' type '}' | typelist '->' typelist | NAME + type ::= nil | integer | float | boolean | string | any + | NAME + | '{' type '}' + | '{' [tabletypefields] }' + | typelist '->' typelist + + tabletypefields ::= NAME ':' type { ',' NAME ':' type} typelist ::= type | '(' [type, {',' type}] ')' block ::= {statement} [returnstat] statement ::= ';' | - var '=' exp | + varlist '=' explist | function_call | do block end | while exp do block end | repeat block until exp | + break | if exp then block {elseif exp then block} [else block] end | for NAME [':' type] '=' exp ',' exp [',' exp] do block end | local name [':' type] '=' exp @@ -394,15 +403,16 @@ As usual, {A} means 0 or more As, and \[A\] means an optional A. var ::= NAME | exp '[' exp ']' | exp '.' Name - exp ::= nil | false | true | NUMBER | STRING | initlist | exp as type | - unop exp | exp binop exp | funccall | '(' exp ')' | exp '.' NAME + exp ::= nil | false | true | NUMBER | STRING | initlist | exp as type + | unop exp | exp binop exp | '(' exp ')' + | NAME | exp '[' exp ']' | exp '.' NAME | funccall + varlist ::= var {',' var} explist ::= exp {',' exp} funccall ::= exp funcargs funcargs ::= '(' [explist] ')' | initlist | STRING - explist ::= exp {',' exp} initlist ::= '{' fieldlist '}' fieldlist ::= [ field {fieldsep field} [fieldsep] ]
virtio: fix the interrupt handling for packed queues Type: fix
@@ -996,7 +996,9 @@ VNET_DEVICE_CLASS_TX_FN (virtio_device_class) (vlib_main_t * vm, clib_spinlock_lock_if_init (&vring->lockp); - if ((vring->used->flags & VRING_USED_F_NO_NOTIFY) == 0 && + if (packed && (vring->device_event->flags != VRING_EVENT_F_DISABLE)) + virtio_kick (vm, vring, vif); + else if ((vring->used->flags & VRING_USED_F_NO_NOTIFY) == 0 && (vring->last_kick_avail_idx != vring->avail->idx)) virtio_kick (vm, vring, vif); @@ -1078,6 +1080,24 @@ virtio_clear_hw_interface_counters (u32 instance) /* Nothing for now */ } +static_always_inline void +virtio_set_rx_interrupt (virtio_if_t * vif, virtio_vring_t * vring) +{ + if (vif->is_packed) + vring->driver_event->flags &= ~VRING_EVENT_F_DISABLE; + else + vring->avail->flags &= ~VRING_AVAIL_F_NO_INTERRUPT; +} + +static_always_inline void +virtio_set_rx_polling (virtio_if_t * vif, virtio_vring_t * vring) +{ + if (vif->is_packed) + vring->driver_event->flags |= VRING_EVENT_F_DISABLE; + else + vring->avail->flags |= VRING_AVAIL_F_NO_INTERRUPT; +} + static clib_error_t * virtio_interface_rx_mode_change (vnet_main_t * vnm, u32 hw_if_index, u32 qid, vnet_hw_if_rx_mode mode) @@ -1090,7 +1110,7 @@ virtio_interface_rx_mode_change (vnet_main_t * vnm, u32 hw_if_index, u32 qid, if (vif->type == VIRTIO_IF_TYPE_PCI && !(vif->support_int_mode)) { - rx_vring->avail->flags |= VRING_AVAIL_F_NO_INTERRUPT; + virtio_set_rx_polling (vif, rx_vring); return clib_error_return (0, "interrupt mode is not supported"); } @@ -1105,7 +1125,7 @@ virtio_interface_rx_mode_change (vnet_main_t * vnm, u32 hw_if_index, u32 qid, virtio_send_interrupt_node.index, VIRTIO_EVENT_STOP_TIMER, 0); } - rx_vring->avail->flags |= VRING_AVAIL_F_NO_INTERRUPT; + virtio_set_rx_polling (vif, rx_vring); } else { @@ -1117,7 +1137,7 @@ virtio_interface_rx_mode_change (vnet_main_t * vnm, u32 hw_if_index, u32 qid, virtio_send_interrupt_node.index, VIRTIO_EVENT_START_TIMER, 0); } - rx_vring->avail->flags &= ~VRING_AVAIL_F_NO_INTERRUPT; + virtio_set_rx_interrupt (vif, rx_vring); } rx_vring->mode = mode;
mangoapp: layer: remove unused stuff
@@ -304,7 +304,6 @@ static VkResult overlay_CreateInstance( instance_data->engineVersion = engineVersion; struct stat info; - // string path = "/var/run/user/" + to_string(getuid()) + "/mangoapp/"; string path = "/tmp/mangoapp/"; string command = "mkdir -p " + path; string json_path = path + to_string(getpid()) + ".json"; @@ -356,13 +355,6 @@ static const struct { static void *find_ptr(const char *name) { - std::string f(name); - - if ((f != "vkCreateInstance" && f != "vkDestroyInstance" && f != "vkCreateDevice" && f != "vkDestroyDevice")) - { - return NULL; - } - for (uint32_t i = 0; i < ARRAY_SIZE(name_to_funcptr_map); i++) { if (strcmp(name, name_to_funcptr_map[i].name) == 0) return name_to_funcptr_map[i].ptr;
Drop '-Wno-maybe-uninitialized' from list of warnings.
@@ -360,7 +360,7 @@ if test -n "$GCC"; then WARNINGS="-Wall -Wunused" dnl Drop some not-useful/unreliable warnings... - for warning in char-subscripts format-truncation format-y2k maybe-uninitialized switch unused-result; do + for warning in char-subscripts format-truncation format-y2k switch unused-result; do AC_MSG_CHECKING([whether compiler supports -Wno-$warning]) OLDCFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wno-$warning -Werror"
Set entry->core_id in ocf_engine_lookup_map_entry core_id should be set in this function. The fact that it is missing might lead to incorrect behaviour e.g. in case of promotion policy.
@@ -51,6 +51,7 @@ void ocf_engine_lookup_map_entry(struct ocf_cache *cache, entry->status = LOOKUP_MISS; entry->coll_idx = cache->device->collision_table_entries; entry->core_line = core_line; + entry->core_id = core_id; line = ocf_metadata_get_hash(cache, hash);
Fix compilation error in lv_roller
@@ -74,7 +74,7 @@ lv_obj_t * lv_roller_create(lv_obj_t * par, const lv_obj_t * copy) lv_roller_ext_t * ext = lv_obj_allocate_ext_attr(new_roller, sizeof(lv_roller_ext_t)); lv_mem_assert(ext); if(ext == NULL) return NULL; - ext->ddlist.roller_ddlist = 0; /*Do not draw arrow by default*/ + ext->ddlist.draw_arrow = 0; /*Do not draw arrow by default*/ /*The signal and design functions are not copied so set them here*/ lv_obj_set_signal_func(new_roller, lv_roller_signal);
rp2/mpthreadport.h: Cast core_state to _mp_state_thread_t. Required for user C++ code to build successfully against ports/rp2.
@@ -41,7 +41,7 @@ static inline void mp_thread_set_state(struct _mp_state_thread_t *state) { } static inline struct _mp_state_thread_t *mp_thread_get_state(void) { - return core_state[get_core_num()]; + return (struct _mp_state_thread_t *)core_state[get_core_num()]; } static inline void mp_thread_mutex_init(mp_thread_mutex_t *m) {
Enable stack protector for Android builds
@@ -37,6 +37,11 @@ if(IOS) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -ftemplate-depth=1024") endif(IOS) +if(ANDROID) +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector") +endif(ANDROID) + if(CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -ftemplate-depth=1024") endif(CMAKE_COMPILER_IS_GNUCXX)
Clang warning: Possible null pointer
@@ -26,7 +26,7 @@ static int encode_file(char *template_file, char *output_file) double *values; in = fopen(template_file,"rb"); assert(in); - if (opt_write) { + if (opt_write && output_file) { out = fopen(output_file,"wb"); assert(out); }
add constrain
@@ -177,25 +177,8 @@ bool Turtlebot3MotorDriver::controlMotor(const float wheel_separation, float* va wheel_velocity_cmd[LEFT] = lin_vel - (ang_vel * wheel_separation / 2); wheel_velocity_cmd[RIGHT] = lin_vel + (ang_vel * wheel_separation / 2); - goal_velocity[LEFT] = wheel_velocity_cmd[LEFT] * VELOCITY_CONSTANT_VALUE; - if (goal_velocity[LEFT] > LIMIT_X_MAX_VELOCITY) - { - goal_velocity[LEFT] = LIMIT_X_MAX_VELOCITY; - } - else if (goal_velocity[LEFT] < -LIMIT_X_MAX_VELOCITY) - { - goal_velocity[LEFT] = -LIMIT_X_MAX_VELOCITY; - } - - goal_velocity[RIGHT] = wheel_velocity_cmd[RIGHT] * VELOCITY_CONSTANT_VALUE; - if (goal_velocity[RIGHT] > LIMIT_X_MAX_VELOCITY) - { - goal_velocity[RIGHT] = LIMIT_X_MAX_VELOCITY; - } - else if (goal_velocity[RIGHT] < -LIMIT_X_MAX_VELOCITY) - { - goal_velocity[RIGHT] = -LIMIT_X_MAX_VELOCITY; - } + goal_velocity[LEFT] = constrain(goal_velocity[LEFT] * VELOCITY_CONSTANT_VALUE, -LIMIT_X_MAX_VELOCITY, LIMIT_X_MAX_VELOCITY); + goal_velocity[RIGHT] = constrain(goal_velocity[RIGHT] * VELOCITY_CONSTANT_VALUE, -LIMIT_X_MAX_VELOCITY, LIMIT_X_MAX_VELOCITY); dxl_comm_result = writeVelocity((int64_t)goal_velocity[LEFT], (int64_t)goal_velocity[RIGHT]); if (dxl_comm_result == false)
chip/stm32/usart_rx_dma.c: Format with clang-format BRANCH=none TEST=none
@@ -27,8 +27,7 @@ void usart_rx_dma_init(struct usart_config const *config) .channel = dma_config->channel, .periph = (void *)&STM32_USART_RDR(base), .flags = (STM32_DMA_CCR_MSIZE_8_BIT | - STM32_DMA_CCR_PSIZE_8_BIT | - STM32_DMA_CCR_CIRC), + STM32_DMA_CCR_PSIZE_8_BIT | STM32_DMA_CCR_CIRC), }; if (IS_ENABLED(CHIP_FAMILY_STM32F4)) @@ -44,8 +43,7 @@ void usart_rx_dma_init(struct usart_config const *config) dma_start_rx(&options, dma_config->fifo_size, dma_config->fifo_buffer); } -static void usart_rx_dma_interrupt_common( - struct usart_config const *config, +static void usart_rx_dma_interrupt_common(struct usart_config const *config, add_data_t add_data) { struct usart_rx_dma const *dma_config = @@ -60,8 +58,7 @@ static void usart_rx_dma_interrupt_common( if (new_index > old_index) { new_bytes = new_index - old_index; - added = add_data(config, - dma_config->fifo_buffer + old_index, + added = add_data(config, dma_config->fifo_buffer + old_index, new_bytes); } else if (new_index < old_index) { /* @@ -71,12 +68,9 @@ static void usart_rx_dma_interrupt_common( */ new_bytes = dma_config->fifo_size - (old_index - new_index); - added = add_data(config, - dma_config->fifo_buffer + old_index, + added = add_data(config, dma_config->fifo_buffer + old_index, dma_config->fifo_size - old_index) + - add_data(config, - dma_config->fifo_buffer, - new_index); + add_data(config, dma_config->fifo_buffer, new_index); } else { /* (new_index == old_index): nothing to add to the queue. */ } @@ -89,8 +83,8 @@ static void usart_rx_dma_interrupt_common( dma_config->state->index = new_index; } -static size_t queue_add(struct usart_config const *config, - const uint8_t *src, size_t count) +static size_t queue_add(struct usart_config const *config, const uint8_t *src, + size_t count) { return queue_add_units(config->producer.queue, (void *)src, count); } @@ -100,7 +94,6 @@ void usart_rx_dma_interrupt(struct usart_config const *config) usart_rx_dma_interrupt_common(config, &queue_add); } - #if defined(CONFIG_USART_HOST_COMMAND) void usart_host_command_rx_dma_interrupt(struct usart_config const *config) {
README: Document missing dependencies We depend on other layers from meta-oe.
@@ -66,7 +66,7 @@ branch: master revision: HEAD URI: git://git.openembedded.org/meta-openembedded -layers: meta-oe, meta-multimedia +layers: meta-oe, meta-multimedia, meta-networking, meta-python branch: master revision: HEAD
Prevent double close on `write_req.cb` errors
@@ -491,6 +491,7 @@ static void write_streaming_body(h2o_http2_conn_t *conn, h2o_http2_stream_t *str if (stream->req.write_req.cb(stream->req.write_req.ctx, is_end_stream) != 0) { stream_send_error(conn, stream->stream_id, H2O_HTTP2_ERROR_STREAM_CLOSED); h2o_http2_stream_reset(conn, stream); + return; } /* close the H2 stream if both sides are done */
Install our custom CA to the system trust store This will only work on certain ubuntu versions
@@ -22,8 +22,13 @@ fi if [ "$SSL" != "nossl" ]; then export MONGOC_TEST_SSL_WEAK_CERT_VALIDATION="on" export MONGOC_TEST_SSL_PEM_FILE="tests/x509gen/client.pem" + sudo cp tests/x509gen/ca.pem /usr/local/share/ca-certificates/cdriver.crt || true + if [ -f /usr/local/share/ca-certificates/cdriver.crt ]; then + sudo update-ca-certificates + else export MONGOC_TEST_SSL_CA_FILE="tests/x509gen/ca.pem" fi +fi export MONGOC_ENABLE_MAJORITY_READ_CONCERN=on export MONGOC_TEST_FUTURE_TIMEOUT_MS=30000
yin parser BUGFIX distinguish between enum and bit correctly
@@ -529,14 +529,22 @@ yin_parse_enum_bit(struct yin_parser_ctx *ctx, struct yin_arg_record *attrs, con { assert(enum_kw == YANG_BIT || enum_kw == YANG_ENUM); struct lysp_type_enum *en; - LY_ARRAY_NEW_RET(ctx->xml_ctx.ctx, type->enums, en, LY_EMEM); - LY_CHECK_RET(yin_parse_attribute(ctx, attrs, YIN_ARG_NAME, &en->name, Y_IDENTIF_ARG, enum_kw)); + struct lysp_type_enum **enums; + + if (enum_kw == YANG_BIT) { + enums = &type->bits; + } else { + enums = &type->enums; + } + + LY_ARRAY_NEW_RET(ctx->xml_ctx.ctx, *enums, en, LY_EMEM); type->flags |= (enum_kw == YANG_ENUM) ? LYS_SET_ENUM : LYS_SET_BIT; + LY_CHECK_RET(yin_parse_attribute(ctx, attrs, YIN_ARG_NAME, &en->name, Y_IDENTIF_ARG, enum_kw)); if (enum_kw == YANG_ENUM) { LY_CHECK_RET(lysp_check_enum_name((struct lys_parser_ctx *)ctx, en->name, strlen(en->name))); YANG_CHECK_NONEMPTY((struct lys_parser_ctx *)ctx, strlen(en->name), "enum"); } - CHECK_UNIQUENESS((struct lys_parser_ctx *)ctx, type->enums, name, ly_stmt2str(enum_kw), en->name); + CHECK_UNIQUENESS((struct lys_parser_ctx *)ctx, *enums, name, ly_stmt2str(enum_kw), en->name); struct yin_subelement subelems[6] = { {YANG_DESCRIPTION, &en->dsc, YIN_SUBELEM_UNIQUE},
fpsensor: Add help descriptions for console commands All the other console commands have help descriptions except for the fingerprint sensor commands. BRANCH=none TEST="help list" in hatch_fp console
@@ -646,7 +646,8 @@ int command_fpcapture(int argc, char **argv) return rc; } -DECLARE_CONSOLE_COMMAND(fpcapture, command_fpcapture, "", ""); +DECLARE_CONSOLE_COMMAND(fpcapture, command_fpcapture, NULL, + "Capture fingerprint in PGM format"); int command_fpenroll(int argc, char **argv) { @@ -681,7 +682,8 @@ int command_fpenroll(int argc, char **argv) return rc; } -DECLARE_CONSOLE_COMMAND(fpenroll, command_fpenroll, "", ""); +DECLARE_CONSOLE_COMMAND(fpenroll, command_fpenroll, NULL, + "Enroll a new fingerprint"); int command_fpmatch(int argc, char **argv) @@ -699,13 +701,15 @@ int command_fpmatch(int argc, char **argv) return rc; } -DECLARE_CONSOLE_COMMAND(fpmatch, command_fpmatch, "", ""); +DECLARE_CONSOLE_COMMAND(fpmatch, command_fpmatch, NULL, + "Run match algorithm against finger"); int command_fpclear(int argc, char **argv) { fp_clear_context(); return EC_SUCCESS; } -DECLARE_CONSOLE_COMMAND(fpclear, command_fpclear, "", ""); +DECLARE_CONSOLE_COMMAND(fpclear, command_fpclear, NULL, + "Clear fingerprint sensor context"); #endif /* CONFIG_CMD_FPSENSOR_DEBUG */
Fix adc-channel typo Merges
@@ -49,8 +49,8 @@ typedef enum { ADC1_CHANNEL_5, /*!< ADC1 channel 5 is GPIO6 */ ADC1_CHANNEL_6, /*!< ADC1 channel 6 is GPIO7 */ ADC1_CHANNEL_7, /*!< ADC1 channel 7 is GPIO8 */ - ADC1_CHANNEL_8, /*!< ADC1 channel 6 is GPIO9 */ - ADC1_CHANNEL_9, /*!< ADC1 channel 7 is GPIO10 */ + ADC1_CHANNEL_8, /*!< ADC1 channel 8 is GPIO9 */ + ADC1_CHANNEL_9, /*!< ADC1 channel 9 is GPIO10 */ ADC1_CHANNEL_MAX, } adc1_channel_t; #elif CONFIG_IDF_TARGET_ESP32C3
in_exec_wasi: do not set event_type
@@ -108,7 +108,6 @@ static int in_exec_wasi_collect(struct flb_input_instance *ins, flb_time_append_to_msgpack(&out_time, &mp_pck, 0); msgpack_sbuffer_write(&mp_sbuf, out_buf, out_size); - ctx->ins->event_type = FLB_INPUT_LOGS; flb_input_log_append(ins, NULL, 0, mp_sbuf.data, mp_sbuf.size); msgpack_sbuffer_destroy(&mp_sbuf); @@ -144,7 +143,6 @@ static int in_exec_wasi_collect(struct flb_input_instance *ins, msgpack_pack_str_body(&mp_pck, ctx->buf, str_len); - ctx->ins->event_type = FLB_INPUT_LOGS; flb_input_log_append(ins, NULL, 0, mp_sbuf.data, mp_sbuf.size); msgpack_sbuffer_destroy(&mp_sbuf);
power_button_x86: Initialize to on if button is pressed This change sets the initial power button state to init-on if the power button is pressed. BRANCH=none TEST=Enter recovery mode by power+recovery button press.
@@ -227,6 +227,9 @@ static void set_initial_pwrbtn_state(void) */ CPRINTS("PB init-off"); power_button_pch_release(); + } else if (power_button_is_pressed()) { + CPRINTS("PB init-on"); + pwrbtn_state = PWRBTN_STATE_INIT_ON; } else { /* * All other EC reset conditions power on the main processor so
iperf: test->ctrl_sck exists per test not a stream. iperf_client_end tries to close test->ctrl_sck per stream. This is not correct because test->ctrl_sck exists per test.
@@ -347,10 +347,11 @@ int iperf_client_end(struct iperf_test *test) iperf_set_send_state(test, IPERF_DONE); + close(test->ctrl_sck); + /* Close all stream sockets */ SLIST_FOREACH(sp, &test->streams, streams) { close(sp->socket); - close(test->ctrl_sck); } return 0;
yolint: fix infra/ migrations
@@ -58,34 +58,8 @@ migrations: - a.yandex-team.ru/games/backend/pkg/leader_boards_service # ST1003: should not use underscores in package names - a.yandex-team.ru/games/backend/pkg/users_service # ST1003: should not use underscores in package names - a.yandex-team.ru/games/backend/internal/db_utils # ST1003: should not use underscores in package names - - a.yandex-team.ru/infra/dist/repo-daemon/internal/mds - - a.yandex-team.ru/infra/nanny2/pkg/hq/cache - - a.yandex-team.ru/infra/nanny2/pkg/hq/housekeeping - - a.yandex-team.ru/infra/nanny2/pkg/hq/service - - a.yandex-team.ru/infra/nanny2/pkg/hq/service/tests - - a.yandex-team.ru/infra/nanny2/pkg/hq/validation - - a.yandex-team.ru/infra/orly/go/orly - - a.yandex-team.ru/infra/rtc/gpu_manager - - a.yandex-team.ru/infra/rtc/gpu_manager/tests - - a.yandex-team.ru/infra/rtc/instance_resolver/bin/instance-resolver - - a.yandex-team.ru/infra/rtc/instance_resolver/internal/server - - a.yandex-team.ru/infra/rtc/instance_resolver/pkg/clients/bot - - a.yandex-team.ru/infra/rtc/instance_resolver/pkg/clients/iss3 - - a.yandex-team.ru/infra/rtc/instance_resolver/pkg/clients/iss3_test - - a.yandex-team.ru/infra/rtc/instance_resolver/pkg/clients/nanny - - a.yandex-team.ru/infra/rtc/instance_resolver/pkg/clients/qloud - - a.yandex-team.ru/infra/rtc/instance_resolver/pkg/clients/qyp - - a.yandex-team.ru/infra/rtc/instance_resolver/pkg/clients/staff - - a.yandex-team.ru/infra/rtc/instance_resolver/pkg/clients/yp - - a.yandex-team.ru/infra/rtc/instance_resolver/pkg/fresh_cache - - a.yandex-team.ru/infra/rtc/loadgen/main - - a.yandex-team.ru/infra/rtc/sbin/ssh_checker - - a.yandex-team.ru/infra/ya_salt/server/pkg/app - - a.yandex-team.ru/infra/ya_salt/server/pkg/bitbucket - - a.yandex-team.ru/infra/ya_salt/server/pkg/bitbucket/tests - - a.yandex-team.ru/infra/ya_salt/server/pkg/sync - - a.yandex-team.ru/infra/ya_salt/server/pkg/sync/tests - - a.yandex-team.ru/infra/ya_salt/server/pkg/types + - a.yandex-team.ru/infra/rtc/instance_resolver/pkg/clients/iss3 # autogenerated + - a.yandex-team.ru/infra/rtc/instance_resolver/pkg/fresh_cache # ST1003: should not use underscores in package names - a.yandex-team.ru/kikimr/public/sdk/go/persqueue - a.yandex-team.ru/kikimr/public/sdk/go/persqueue_test - a.yandex-team.ru/kikimr/public/sdk/go/ydb/table
Windows CI remove those pesky carriage returns.
@@ -102,6 +102,7 @@ exit /b 0 mkdir dist janet.exe tools\gendoc.janet > dist\doc.html janet.exe tools\removecr.janet dist\doc.html +janet.exe tools\removecr.janet build\janet.c copy build\janet.c dist\janet.c copy src\mainclient\shell.c dist\shell.c
Eliminate gcc warning.
@@ -96,8 +96,8 @@ celix_log_level_e celix_logUtils_logLevelFromStringWithCheck(const char *str, ce return level; } -static inline void celix_logUtils_inlinePrintBacktrace(FILE *stream) { #ifndef __UCLIBC__ +static inline void celix_logUtils_inlinePrintBacktrace(FILE *stream) { void *bbuf[64]; int nrOfTraces = backtrace(bbuf, 64); char **lines = backtrace_symbols(bbuf, nrOfTraces); @@ -107,8 +107,12 @@ static inline void celix_logUtils_inlinePrintBacktrace(FILE *stream) { } free(lines); fflush(stream); -#endif } +#else /* __UCLIBC__ */ +static inline void celix_logUtils_inlinePrintBacktrace(FILE *stream __attribute__((unused))) { + //nop +} +#endif /* __UCLIBC__ */ void celix_logUtils_printBacktrace(FILE* stream) { celix_logUtils_inlinePrintBacktrace(stream);
decision: split decision and rationale
@@ -202,17 +202,17 @@ Possible copy-on-write implementations are described in [another decision](../1_ ## Decision Implement the copy-on-write approach. -As we need COW for change tracking anyway, it makes sense to also use this approach for the internal cache. -This also does not require any changes or restrictions to the current API. We keep a copy of all keys returned by the backends in memory. -We use `ksBelow` to only return the keys the user requested on `kdbGet`. -On `kdbSet` we use the cached in-memory keys to fill in the missing keys outside of `parentKey` that are needed for all the backends to save. +We use `ksBelow` to only return a copy-on-write copy of keys the user requested on `kdbGet`. +On `kdbSet` we use the cached in-memory keys to fill in the missing keys outside of `parentKey` that are needed for all the backends to save. ## Rationale Semantics can be provided without additional code or overhead in the core. +As we need copy-on-write for efficient change tracking anyway, it makes sense to also use this approach for the internal cache. +This also does not require any changes or restrictions to the current API. ## Implications
bootutil: fix unitialized variable warning For some configurations, eg CONFIG_BOOT_DIRECT_XIP=y, fih_rc might never be initialized; initialize and fix warning.
@@ -2207,7 +2207,7 @@ context_boot_go(struct boot_loader_state *state, struct boot_rsp *rsp) uint32_t img_sz; uint32_t img_loaded = 0; #endif /* MCUBOOT_RAM_LOAD */ - fih_int fih_rc; + fih_int fih_rc = FIH_FAILURE; memset(state, 0, sizeof(struct boot_loader_state));
typo in message Tested-by: Build Bot
@@ -95,7 +95,7 @@ void Connstart::unwatch() { static void try_enable_sockopt(lcbio_SOCKET *sock, int cntl) { lcb_error_t rv = lcbio_enable_sockopt(sock, cntl); if (rv == LCB_SUCCESS) { - lcb_log(LOGARGS(sock, DEBUG), CSLOGFMT "Successfuly set %s", CSLOGID(sock), lcbio_strsockopt(cntl)); + lcb_log(LOGARGS(sock, DEBUG), CSLOGFMT "Successfully set %s", CSLOGID(sock), lcbio_strsockopt(cntl)); } else { lcb_log(LOGARGS(sock, INFO), CSLOGFMT "Couldn't set %s", CSLOGID(sock), lcbio_strsockopt(cntl)); }
Replace `ioutil.ReadFile` -> `os.ReadFile`
@@ -3,7 +3,6 @@ package util import ( "errors" "fmt" - "io/ioutil" "os" "os/user" "strconv" @@ -246,7 +245,7 @@ func PidUser(pid int) (string, error) { func PidScoped(pid int) bool { // Look for libscope in /proc maps - pidMapFile, err := ioutil.ReadFile(fmt.Sprintf("/proc/%v/maps", pid)) + pidMapFile, err := os.ReadFile(fmt.Sprintf("/proc/%v/maps", pid)) if err != nil { return false }
[core] replace strncasecmp w/ buffer_eq_icase_ssn replace strncasecmp() w/ buffer_clen() and buffer_eq_icase_ssn() (portability; remove use of alt sys-strings.h portability header)
#include <limits.h> #include <stdlib.h> /* strtol(), strtoll() */ #include <string.h> /* memmove() */ -#include <strings.h> /* strcasecmp(), strncasecmp() */ #include "buffer.h" #include "chunk.h" @@ -290,7 +289,8 @@ http_range_process (request_st * const r, const buffer * const http_range) /* An origin server MUST ignore a Range header field that contains a * range unit it does not understand. */ - if (0 != strncasecmp(http_range->ptr, "bytes=", sizeof("bytes=")-1)) + if (buffer_clen(http_range) < sizeof("bytes=")-1 + || !buffer_eq_icase_ssn(http_range->ptr, "bytes=", sizeof("bytes=")-1)) return r->http_status; /* 200 OK */ /* arbitrary limit: support up to RMAX ranges in request Range field @@ -371,8 +371,8 @@ http_range_rfc7233 (request_st * const r) http_header_response_get(r, HTTP_HEADER_CONTENT_TYPE, CONST_STR_LEN("Content-Type")); if (content_type - && 0 == strncasecmp(content_type->ptr, - "multipart/byteranges", + && buffer_clen(content_type) >= sizeof("multipart/byteranges")-1 + && buffer_eq_icase_ssn(content_type->ptr, "multipart/byteranges", sizeof("multipart/byteranges")-1)) return http_status; #endif
update README to build michelfralloc
@@ -7,5 +7,9 @@ in order to provide a dynamic memory allocation system with variable block sizes To build the library, first get **ptmalloc3**: http://www.malloc.de/malloc/ptmalloc3-current.tar.gz and put the `ptmalloc3` directory of the archive at the root of this directory. -Then you can build plugins_malloc by running `make` in this directory +Then run the following command with the directory containing this README file as your current working directory: + + patch -p0 < ptmalloc.patch + +Then you can build michelfralloc by running `make` in this directory
remove timing template for 15ms (not used).
@@ -169,16 +169,6 @@ enum ieee154e_atomicdurations_enum { wdAckDuration = (3000/PORT_US_PER_TICK), // 3000us (measured 1000us) #endif -#if SLOTDURATION==15 - TsTxOffset = (4000/PORT_US_PER_TICK), // 4000us - TsLongGT = (1300/PORT_US_PER_TICK), // 1300us - TsTxAckDelay = (4606/PORT_US_PER_TICK), // 4606us - TsShortGT = (500/PORT_US_PER_TICK), // 500us - wdRadioTx = (1342/PORT_US_PER_TICK), // 1342us (needs to be >delayTx) (SCuM need a larger value, 45 is tested and works) - wdDataDuration = (5000/PORT_US_PER_TICK), // 5000us (measured 4280us with max payload) - wdAckDuration = (3000/PORT_US_PER_TICK), // 3000us (measured 1000us) -#endif - #if SLOTDURATION==20 TsTxOffset = (5215/PORT_US_PER_TICK), // 5215us TsLongGT = (1311/PORT_US_PER_TICK), // 1311us