message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
ci: artifacts: adjust musl build triplet name
Use the same build triplet name that Rust uses: `x86_64-unknown-linux-musl`
CI-Tags: #no_auto_pr | @@ -10,7 +10,7 @@ if [ "$RUNNER_OS" == "macOS" ]; then
EXECUTABLES=("sbp2json" "json2sbp" "json2json")
PACKAGE_CMD="zip ../../$ARTIFACT_NAME ${EXECUTABLES[*]}"
elif [ "$RUNNER_OS" == "Linux" ]; then
- BUILD_TRIPLET="x86_64-linux-musl"
+ BUILD_TRIPLET="x86_64-unknown-linux-musl"
ARTIFACT_NAME="sbp_tools-${VERSION}-${BUILD_TRIPLET}.zip"
EXECUTABLES=("sbp2json" "json2sbp" "json2json")
PACKAGE_CMD="zip ../../../$ARTIFACT_NAME ${EXECUTABLES[*]}"
|
wording: EAPOL M1M2 - change from not authorized to challenge | @@ -188,8 +188,8 @@ if(flagfilterouiclient == true)
}
if(flagfilterapless == true) printf("filter by M2...........: requested from client (AP-LESS)\n");
if(flagfilterrcchecked == true) printf("filter by replaycount..: checked\n");
-if(flagfilterauthorized == true) printf("filter by status.......: authorized\n");
-if(flagfilternotauthorized == true) printf("filter by status.......: not authorized\n");
+if(flagfilterauthorized == true) printf("filter by status.......: authorized (M1M4, M2M3 or M3M4)\n");
+if(flagfilternotauthorized == true) printf("filter by status.......: challenge (M1M2)\n");
if(pmkidwrittencount > 0) printf("PMKID written..........: %ld\n", pmkidwrittencount);
if(eapolwrittencount > 0) printf("EAPOL written..........: %ld\n", eapolwrittencount);
if(hccapxwrittencount > 0) printf("EAPOL written to hccapx: %ld\n", hccapxwrittencount);
@@ -1235,7 +1235,7 @@ if(zeiger->type == HCX_TYPE_EAPOL)
if((zeiger->mp & 0x10) == 0x10) fprintf(fh_pmkideapol, "RC INFO....: ROGUE attack / NC not required\n");
if((zeiger->mp & 0xe0) == 0x20) fprintf(fh_pmkideapol, "RC INFO....: little endian router / NC LE suggested\n");
if((zeiger->mp & 0xe0) == 0x40) fprintf(fh_pmkideapol, "RC INFO....: big endian router / NC BE suggested\n");
- if((zeiger->mp & 0x07) == 0x00) fprintf(fh_pmkideapol, "MP M1M2 E2.: not authorized\n");
+ if((zeiger->mp & 0x07) == 0x00) fprintf(fh_pmkideapol, "MP M1M2 E2.: challenge\n");
if((zeiger->mp & 0x07) == 0x01) fprintf(fh_pmkideapol, "MP M1M4 E4.: authorized\n");
if((zeiger->mp & 0x07) == 0x02) fprintf(fh_pmkideapol, "MP M2M3 E2.: authorized\n");
if((zeiger->mp & 0x07) == 0x03) fprintf(fh_pmkideapol, "MP M2M3 E3.: authorized\n");
|
Change way we retrieve and set paths in Options
Makes everything relative in some way from .exe, which should prove more reliable | @@ -8,19 +8,15 @@ static std::unique_ptr<Options> s_instance;
Options::Options(HMODULE aModule)
{
- char path[2048 + 1] = { 0 };
- GetModuleFileNameA(aModule, path, std::size(path) - 1);
- Path = path;
-
- char exePath[2048 + 1] = { 0 };
- GetModuleFileNameA(GetModuleHandleA(nullptr), exePath, std::size(exePath) - 1);
+ TCHAR exePath[2048 + 1] = { 0 };
+ GetModuleFileName(GetModuleHandle(nullptr), exePath, std::size(exePath) - 1);
ExePath = exePath;
- int verInfoSz = GetFileVersionInfoSizeA(exePath, nullptr);
+ int verInfoSz = GetFileVersionInfoSize(exePath, nullptr);
if(verInfoSz)
{
auto verInfo = std::make_unique<BYTE[]>(verInfoSz);
- if(GetFileVersionInfoA(exePath, 0, verInfoSz, verInfo.get()))
+ if(GetFileVersionInfo(exePath, 0, verInfoSz, verInfo.get()))
{
struct
{
@@ -29,16 +25,16 @@ Options::Options(HMODULE aModule)
} *pTranslations;
UINT transBytes = 0;
- if(VerQueryValueA(verInfo.get(), "\\VarFileInfo\\Translation", reinterpret_cast<void**>(&pTranslations), &transBytes))
+ if(VerQueryValue(verInfo.get(), _T("\\VarFileInfo\\Translation"), reinterpret_cast<void**>(&pTranslations), &transBytes))
{
UINT dummy;
char* productName = nullptr;
char subBlock[64];
for(UINT i = 0; i < (transBytes / sizeof(*pTranslations)); i++)
{
- sprintf_s(subBlock, "\\StringFileInfo\\%04x%04x\\ProductName", pTranslations[i].Language, pTranslations[i].CodePage);
- if(VerQueryValueA(verInfo.get(), subBlock, reinterpret_cast<void**>(&productName), &dummy))
- if (strcmp(productName, "Cyberpunk 2077") == 0)
+ _stprintf(subBlock, _T("\\StringFileInfo\\%04x%04x\\ProductName"), pTranslations[i].Language, pTranslations[i].CodePage);
+ if(VerQueryValue(verInfo.get(), subBlock, reinterpret_cast<void**>(&productName), &dummy))
+ if (_tcscmp(productName, _T("Cyberpunk 2077")) == 0)
{
ExeValid = true;
break;
@@ -48,14 +44,14 @@ Options::Options(HMODULE aModule)
}
}
// check if exe name matches in case previous check fails
- ExeValid = ExeValid || (ExePath.filename() == "Cyberpunk2077.exe");
+ ExeValid = ExeValid || (ExePath.filename() == _T("Cyberpunk2077.exe"));
if (!IsCyberpunk2077())
return;
- Path = Path.parent_path().parent_path();
- Path /= "plugins";
- Path /= "cyber_engine_tweaks/";
+ Path = ExePath.parent_path();
+ Path /= _T("plugins");
+ Path /= _T("cyber_engine_tweaks\\");
std::error_code ec;
create_directories(Path, ec);
@@ -72,6 +68,8 @@ Options::Options(HMODULE aModule)
{
auto [major, minor] = GameImage.GetVersion();
spdlog::info("Game version {}.{:02d}", major, minor);
+ spdlog::info("EXE path: \"{}\"", ExePath.string().c_str());
+ spdlog::info("Cyber Engine Tweaks path: \"{}\"", Path.string().c_str());
}
else
spdlog::info("Unknown Game Version, update the mod");
|
Fix WIN32 compilation warning | @@ -242,11 +242,7 @@ handle_upcall(struct socket *upcall_socket, void *upcall_data, int upcall_flags)
} else {
if (par_very_verbose) {
if (infotype == SCTP_RECVV_RCVINFO) {
-#ifdef _WIN32
- printf("Message received - %" PRIu64 " bytes - %s - sid %u - tsn %u %s\n",
-#else
printf("Message received - %zd bytes - %s - sid %u - tsn %u %s\n",
-#endif
n,
(rcvinfo->rcv_flags & SCTP_UNORDERED) ? "unordered" : "ordered",
rcvinfo->rcv_sid,
@@ -255,11 +251,7 @@ handle_upcall(struct socket *upcall_socket, void *upcall_data, int upcall_flags)
);
} else {
-#ifdef _WIN32
- printf("Message received - %" PRIu64 " bytes %s\n", n, (recv_flags & MSG_EOR) ? "- EOR" : "");
-#else
printf("Message received - %zd bytes %s\n", n, (recv_flags & MSG_EOR) ? "- EOR" : "");
-#endif
}
}
tsctp_meta->stat_fragment_sum += n;
|
Check byte information behaviour in handlers | @@ -2239,6 +2239,28 @@ START_TEST(test_byte_info_at_error)
}
END_TEST
+/* Test position information in handler */
+static void
+byte_character_handler(void *UNUSED_P(userData),
+ const XML_Char *UNUSED_P(s),
+ int len)
+{
+ if (XML_GetCurrentByteIndex(parser) != 5)
+ fail("Character byte index incorrect");
+ if (XML_GetCurrentByteCount(parser) != len)
+ fail("Character byte count incorrect");
+}
+
+START_TEST(test_byte_info_at_cdata)
+{
+ const char *text = "<doc>Hello</doc>";
+
+ XML_SetCharacterDataHandler(parser, byte_character_handler);
+ if (XML_Parse(parser, text, strlen(text), XML_TRUE) != XML_STATUS_OK)
+ xml_failure(parser);
+}
+END_TEST
+
/*
* Namespaces tests.
@@ -3318,6 +3340,7 @@ make_suite(void)
tcase_add_test(tc_basic, test_get_buffer_2);
tcase_add_test(tc_basic, test_byte_info_at_end);
tcase_add_test(tc_basic, test_byte_info_at_error);
+ tcase_add_test(tc_basic, test_byte_info_at_cdata);
suite_add_tcase(s, tc_namespace);
tcase_add_checked_fixture(tc_namespace,
|
metadata-store: unhide all groups | +$ state-9 [%9 base-state-3]
+$ state-10 [%10 base-state-3]
+$ state-11 [%11 base-state-3]
++$ state-12 [%12 base-state-3]
+$ versioned-state
$% state-0
state-1
state-9
state-10
state-11
+ state-12
==
::
+$ inflated-state
- $: state-11
+ $: state-12
cached-indices
==
--
=| cards=(list card)
|^
=* loop $
- ?: ?=(%11 -.old)
+ ?: ?=(%12 -.old)
:- cards
%_ state
associations associations.old
group-indices (rebuild-group-indices associations.old)
app-indices (rebuild-app-indices associations.old)
==
+ ?: ?=(%11 -.old)
+ $(-.old %12, associations.old (reset-group-hidden associations.old))
?: ?=(%10 -.old)
$(-.old %11, associations.old (hide-dm-assoc associations.old))
?: ?=(%9 -.old)
==
:: pre-breach, can safely throw away
loop(old *state-8)
+ ::
+ ++ reset-group-hidden
+ |= assoc=associations:store
+ ^- associations:store
+ %- ~(gas by *associations:store)
+ %+ turn ~(tap by assoc)
+ |= [m=md-resource:store [g=resource met=metadatum:store]]
+ ^- [md-resource:store association:store]
+ =? hidden.met ?=(%groups app-name.m)
+ %.n
+ [m [g met]]
+
::
++ hide-dm-assoc
|= assoc=associations:store
|
sanitizers: swapped pc and crashAddr in san parsing | @@ -146,8 +146,8 @@ size_t sanitizers_parseReport(run_t* run, pid_t pid, funcs_t* funcs, uint64_t* p
}
headerFound = true;
sscanf(lineptr,
- "==%*d==ERROR: %*[^:]: %*[^ ] on address 0x%" PRIx64 " at pc 0x%" PRIx64, pc,
- crashAddr);
+ "==%*d==ERROR: %*[^:]: %*[^ ] on address 0x%" PRIx64 " at pc 0x%" PRIx64, crashAddr,
+ pc);
sscanf(lineptr,
"==%*d==ERROR: %*[^:]: %*[^ ] on %*s address 0x%" PRIx64 " (pc 0x%" PRIx64,
crashAddr, pc);
|
Ignore HTTP Date values with invalid year (Apple Issue | @@ -840,6 +840,13 @@ httpGetDateTime(const char *s) /* I - Date/time string */
DEBUG_printf(("4httpGetDateTime: day=%d, mon=\"%s\", year=%d, hour=%d, "
"min=%d, sec=%d", day, mon, year, hour, min, sec));
+ /*
+ * Check for invalid year (RFC 7231 says it's 4DIGIT)
+ */
+
+ if (year > 9999)
+ return (0);
+
/*
* Convert the month name to a number from 0 to 11.
*/
|
esp_hw_support: Fix typo on esp32s3 ets_update_cpu_frequency introduced in | @@ -79,7 +79,7 @@ int IRAM_ATTR esp_clk_xtal_freq(void)
return rtc_clk_xtal_freq_get() * MHZ;
}
-#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESPS3
+#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3
void IRAM_ATTR ets_update_cpu_frequency(uint32_t ticks_per_us)
{
/* Update scale factors used by esp_rom_delay_us */
|
ble_hs_adv: Fix small mistake in ble_hs_adv_parse_one_field
Fix small mistake while parsing service uuid32 in `ble_hs_adv_parse_one_field`. | @@ -594,7 +594,7 @@ ble_hs_adv_parse_one_field(struct ble_hs_adv_fields *adv_fields,
if (rc != 0) {
return rc;
}
- adv_fields->uuids16_is_complete = 0;
+ adv_fields->uuids32_is_complete = 0;
break;
case BLE_HS_ADV_TYPE_COMP_UUIDS32:
@@ -602,7 +602,7 @@ ble_hs_adv_parse_one_field(struct ble_hs_adv_fields *adv_fields,
if (rc != 0) {
return rc;
}
- adv_fields->uuids16_is_complete = 1;
+ adv_fields->uuids32_is_complete = 1;
break;
case BLE_HS_ADV_TYPE_INCOMP_UUIDS128:
|
docs(msgbox) fix typo | @@ -27,7 +27,7 @@ The message box is built from other widgets, so you can check these widgets' doc
If `parent` is `NULL` the message box will be modal. `title` and `txt` are strings for the title and the text.
`btn_txts[]` is an array with the buttons' text. E.g. `const char * btn_txts[] = {"Ok", "Cancel", NULL}`.
-`add_colse_btn` can be `true` or `false` to add/don't add a close button.
+`add_close_btn` can be `true` or `false` to add/don't add a close button.
### Get the parts
The building blocks of the message box can be obtained using the following functions:
|
Fix Change default answer for init script | @@ -43,14 +43,24 @@ question_postgresql_password() {
}
question_elk_start() {
- read -p "Do you want to start ELK (true/false) [true] ? " elk_start
- elk_start=${elk_start:-true}
+ read -p "Do you want to start ELK (yes/no) [yes] ? " elk_start
+ elk_start=${elk_start:-yes}
+ if [[ "$elk_start" = "yes" ]] || [[ "$elk_start" = "y" ]] || [[ "$elk_start" = "true" ]]; then
+ elk_start=true
+ else
+ elk_start=false
+ fi
set_property "ELKactivation" $elk_start $CONFIG_FILE
}
question_start_datafari() {
- read -p "Do you want Datafari to be started ? [true]: " start_datafari
+ read -p "Do you want Datafari to be started (yes/no)? [yes] ? " start_datafari
start_datafari=${start_datafari:-true}
+ if [[ "$start_datafari" = "yes" ]] || [[ "$start_datafari" = "y" ]] || [[ "$start_datafari" = "true" ]]; then
+ start_datafari=true
+ else
+ start_datafari=false
+ fi
}
## Installer functions
|
Fix code comment in spec related to PDF problem | @@ -27,7 +27,7 @@ RSpec.describe Magick::Image, '#read' do
end
describe 'issue #483', supported_after('6.9.0') do
- # On Windows platform, it causes SEGV with ImageMagick 6.8.x
+ # The newer Ghostscript might not be worked with old ImageMagick.
it 'can read PDF file' do
expect { described_class.read(File.join(FIXTURE_PATH, 'sample.pdf')) }.not_to raise_error
end
|
OSSL_CMP_SRV_process_request(): fix recipNonce on error in subsequent request of a transaction | @@ -447,7 +447,7 @@ OSSL_CMP_MSG *OSSL_CMP_SRV_process_request(OSSL_CMP_SRV_CTX *srv_ctx,
ASN1_OCTET_STRING *backup_secret;
OSSL_CMP_PKIHEADER *hdr;
int req_type, rsp_type;
- int res;
+ int req_verified = 0;
OSSL_CMP_MSG *rsp = NULL;
if (srv_ctx == NULL || srv_ctx->ctx == NULL
@@ -505,12 +505,12 @@ OSSL_CMP_MSG *OSSL_CMP_SRV_process_request(OSSL_CMP_SRV_CTX *srv_ctx,
}
}
- res = ossl_cmp_msg_check_update(ctx, req, unprotected_exception,
+ req_verified = ossl_cmp_msg_check_update(ctx, req, unprotected_exception,
srv_ctx->acceptUnprotected);
if (ctx->secretValue != NULL && ctx->pkey != NULL
&& ossl_cmp_hdr_get_protection_nid(hdr) != NID_id_PasswordBasedMAC)
ctx->secretValue = NULL; /* use MSG_SIG_ALG when protecting rsp */
- if (!res)
+ if (!req_verified)
goto err;
switch (req_type) {
@@ -569,8 +569,14 @@ OSSL_CMP_MSG *OSSL_CMP_SRV_process_request(OSSL_CMP_SRV_CTX *srv_ctx,
/* fail_info is not very specific */
OSSL_CMP_PKISI *si = NULL;
- if (ctx->transactionID == NULL) {
- /* ignore any (extra) error in next two function calls: */
+ if (!req_verified) {
+ /*
+ * Above ossl_cmp_msg_check_update() was not successfully executed,
+ * which normally would set ctx->transactionID and ctx->recipNonce.
+ * So anyway try to provide the right transactionID and recipNonce,
+ * while ignoring any (extra) error in next two function calls.
+ */
+ if (ctx->transactionID == NULL)
(void)OSSL_CMP_CTX_set1_transactionID(ctx, hdr->transactionID);
(void)ossl_cmp_ctx_set1_recipNonce(ctx, hdr->senderNonce);
}
|
Corrected logic when checking if alarms are enabled | @@ -299,7 +299,7 @@ SmartAndHealthCheck(
goto Finish;
}
- if (FALSE == AlarmEnabled && HealthInfo.MediaTemperature > MediaTemperatureThreshold) {
+ if (FALSE != AlarmEnabled && HealthInfo.MediaTemperature > MediaTemperatureThreshold) {
APPEND_RESULT_TO_THE_LOG(pDimm, STRING_TOKEN(STR_QUICK_MEDIA_TEMP_EXCEEDS_ALARM_THR), EVENT_CODE_505, DIAG_STATE_MASK_WARNING, ppResultStr, pDiagState,
pDimmStr, HealthInfo.MediaTemperature, MediaTemperatureThreshold);
}
@@ -316,7 +316,7 @@ SmartAndHealthCheck(
goto Finish;
}
- if (FALSE == AlarmEnabled && HealthInfo.ControllerTemperature > ControllerTemperatureThreshold) {
+ if (FALSE != AlarmEnabled && HealthInfo.ControllerTemperature > ControllerTemperatureThreshold) {
APPEND_RESULT_TO_THE_LOG(pDimm, STRING_TOKEN(STR_QUICK_CONTROLLER_TEMP_EXCEEDS_ALARM_THR), EVENT_CODE_511, DIAG_STATE_MASK_WARNING, ppResultStr, pDiagState,
pDimmStr, HealthInfo.ControllerTemperature, ControllerTemperatureThreshold);
}
@@ -333,7 +333,7 @@ SmartAndHealthCheck(
goto Finish;
}
- if (FALSE == AlarmEnabled && HealthInfo.PercentageRemaining < PercentageRemainingThreshold) {
+ if (FALSE != AlarmEnabled && HealthInfo.PercentageRemaining < PercentageRemainingThreshold) {
APPEND_RESULT_TO_THE_LOG(pDimm, STRING_TOKEN(STR_QUICK_SPARE_CAPACITY_BELOW_ALARM_THR), EVENT_CODE_506, DIAG_STATE_MASK_WARNING, ppResultStr, pDiagState,
pDimmStr, HealthInfo.PercentageRemaining, PercentageRemainingThreshold);
}
|
dpdk: add additional fields to rte_mbuf trace print | @@ -756,12 +756,15 @@ format_dpdk_rte_mbuf (u8 * s, va_list * va)
s = format (s, "PKT MBUF: port %d, nb_segs %d, pkt_len %d"
"\n%Ubuf_len %d, data_len %d, ol_flags 0x%lx, data_off %d, phys_addr 0x%x"
- "\n%Upacket_type 0x%x l2_len %u l3_len %u outer_l2_len %u outer_l3_len %u",
+ "\n%Upacket_type 0x%x l2_len %u l3_len %u outer_l2_len %u outer_l3_len %u"
+ "\n%Urss 0x%x fdir.hi 0x%x fdir.lo 0x%x",
mb->port, mb->nb_segs, mb->pkt_len,
format_white_space, indent,
mb->buf_len, mb->data_len, mb->ol_flags, mb->data_off,
mb->buf_physaddr, format_white_space, indent, mb->packet_type,
- mb->l2_len, mb->l3_len, mb->outer_l2_len, mb->outer_l3_len);
+ mb->l2_len, mb->l3_len, mb->outer_l2_len, mb->outer_l3_len,
+ format_white_space, indent, mb->hash.rss, mb->hash.fdir.hi,
+ mb->hash.fdir.lo);
if (mb->ol_flags)
s = format (s, "\n%U%U", format_white_space, indent,
|
Update jsapi.c
Add true and false as keywords; should fix | @@ -775,7 +775,7 @@ static duk_ret_t duk_reset(duk_context* duk)
return 0;
}
-static const char* const ApiKeywords[] = API_KEYWORDS;
+static const char* const Apis[] = API_KEYWORDS;
static const struct{duk_c_function func; s32 params;} ApiFunc[] =
{
{NULL, 0},
@@ -936,7 +936,8 @@ static const char* const JsKeywords [] =
"break", "do", "instanceof", "typeof", "case", "else", "new",
"var", "catch", "finally", "return", "void", "continue", "for",
"switch", "while", "debugger", "function", "this", "with",
- "default", "if", "throw", "delete", "in", "try", "const"
+ "default", "if", "throw", "delete", "in", "try", "const",
+ "true", "false"
};
static inline bool isalnum_(char c) {return isalnum(c) || c == '_';}
|
gmskframegen: setting state to write zeros when frame complete | @@ -499,6 +499,7 @@ int gmskframegen_write_tail(gmskframegen _q,
if (_q->symbol_counter == _q->tail_len) {
_q->symbol_counter = 0;
_q->frame_complete = 1;
+ _q->state = STATE_UNASSEMBLED;
}
return LIQUID_OK;
}
|
Place the vpp_papi*.egg file together with other build products.
This way it will be deleted when clean/wipe is performed. | @@ -19,4 +19,5 @@ install-exec-local:
--prefix $(DESTDIR)$(prefix) \
--single-version-externally-managed \
--verbose \
- bdist_egg)
+ bdist_egg \
+ --dist-dir=$(DESTDIR)$(prefix))
|
Disable noexcept-type warning of g++-7 | @@ -243,6 +243,9 @@ if test "x$werror" != "xno"; then
#AX_CHECK_COMPILE_FLAG([-Werror], [CXXFLAGS="$CXXFLAGS -Werror"])
AX_CHECK_COMPILE_FLAG([-Wformat-security], [CXXFLAGS="$CXXFLAGS -Wformat-security"])
AX_CHECK_COMPILE_FLAG([-Wsometimes-uninitialized], [CXXFLAGS="$CXXFLAGS -Wsometimes-uninitialized"])
+ # Disable noexcept-type warning of g++-7. This is not harmful as
+ # long as all source files are compiled with the same compiler.
+ AX_CHECK_COMPILE_FLAG([-Wno-noexcept-type], [CXXFLAGS="$CXXFLAGS -Wno-noexcept-type"])
AC_LANG_POP()
fi
|
sysdeps/managarm: Convert sys_fchmodat to bragi | @@ -4074,40 +4074,29 @@ int sys_fchmod(int fd, mode_t mode) {
int sys_fchmodat(int fd, const char *pathname, mode_t mode, int flags) {
SignalGuard sguard;
- HelAction actions[3];
- globalQueue.trim();
- managarm::posix::CntRequest<MemoryAllocator> req(getSysdepsAllocator());
- req.set_request_type(managarm::posix::CntReqType::FCHMODAT);
+ managarm::posix::FchmodAtRequest<MemoryAllocator> req(getSysdepsAllocator());
req.set_fd(fd);
req.set_path(frg::string<MemoryAllocator>(getSysdepsAllocator(), pathname));
req.set_mode(mode);
req.set_flags(flags);
- frg::string<MemoryAllocator> ser(getSysdepsAllocator());
- req.SerializeToString(&ser);
- actions[0].type = kHelActionOffer;
- actions[0].flags = kHelItemAncillary;
- actions[1].type = kHelActionSendFromBuffer;
- actions[1].flags = kHelItemChain;
- actions[1].buffer = ser.data();
- actions[1].length = ser.size();
- actions[2].type = kHelActionRecvInline;
- actions[2].flags = 0;
- HEL_CHECK(helSubmitAsync(getPosixLane(), actions, 3,
- globalQueue.getQueue(), 0, 0));
-
- auto element = globalQueue.dequeueSingle();
- auto offer = parseSimple(element);
- auto send_req = parseSimple(element);
- auto recv_resp = parseInline(element);
+ auto [offer, send_head, send_tail, recv_resp] =
+ exchangeMsgsSync(
+ getPosixLane(),
+ helix_ng::offer(
+ helix_ng::sendBragiHeadTail(req, getSysdepsAllocator()),
+ helix_ng::recvInline()
+ )
+ );
- HEL_CHECK(offer->error);
- HEL_CHECK(send_req->error);
- HEL_CHECK(recv_resp->error);
+ HEL_CHECK(offer.error());
+ HEL_CHECK(send_head.error());
+ HEL_CHECK(send_tail.error());
+ HEL_CHECK(recv_resp.error());
managarm::posix::SvrResponse<MemoryAllocator> resp(getSysdepsAllocator());
- resp.ParseFromArray(recv_resp->data, recv_resp->length);
+ resp.ParseFromArray(recv_resp.data(), recv_resp.length());
if(resp.error() == managarm::posix::Errors::FILE_NOT_FOUND) {
return ENOENT;
}else if(resp.error() == managarm::posix::Errors::NO_SUCH_FD) {
|
Correct range_n limiting
same bug as seen in somehow missed in corresponding PR | @@ -346,8 +346,8 @@ int CNAME(BLASLONG m, FLOAT *a, BLASLONG lda, FLOAT *x, BLASLONG incx, FLOAT *bu
range_m[MAX_CPU_NUMBER - num_cpu - 1] = range_m[MAX_CPU_NUMBER - num_cpu] - width;
range_n[num_cpu] = num_cpu * (((m + 15) & ~15) + 16);
- if (range_n[num_cpu] > m) range_n[num_cpu] = m;
-
+ if (range_n[num_cpu] > m * num_cpu) range_n[num_cpu] = m * num_cpu;
+ }
queue[num_cpu].mode = mode;
queue[num_cpu].routine = trmv_kernel;
queue[num_cpu].args = &args;
@@ -386,8 +386,7 @@ int CNAME(BLASLONG m, FLOAT *a, BLASLONG lda, FLOAT *x, BLASLONG incx, FLOAT *bu
range_m[num_cpu + 1] = range_m[num_cpu] + width;
range_n[num_cpu] = num_cpu * (((m + 15) & ~15) + 16);
- if (range_n[num_cpu] > m) range_n[num_cpu] = m;
-
+ if (range_n[num_cpu] > m * num_cpu) range_n[num_cpu] = m * num_cpu;
queue[num_cpu].mode = mode;
queue[num_cpu].routine = trmv_kernel;
queue[num_cpu].args = &args;
|
grib_to_netcdf unit for time does not comply to ISO8601 | @@ -2968,11 +2968,11 @@ static int define_netcdf_dimensions(hypercube *h, fieldset *fs, int ncid, datase
if(strcmp(axis, "time") == 0)
{
boolean onedtime = (count_values(cube, "date") == 0 && count_values(cube, "step") == 0);
- sprintf(u, "hours since 0000-00-00 00:00:0.0");
+ sprintf(u, "hours since 0000-00-00 00:00:00.0");
longname = "reference_time";
if(setup.usevalidtime || onedtime)
{
- sprintf(u, "hours since %ld-%02ld-%02ld 00:00:0.0", setup.refdate / 10000, (setup.refdate % 10000) / 100, (setup.refdate % 100));
+ sprintf(u, "hours since %ld-%02ld-%02ld 00:00:00.0", setup.refdate / 10000, (setup.refdate % 10000) / 100, (setup.refdate % 100));
longname = "time";
}
if(setup.climatology)
@@ -2994,7 +2994,7 @@ static int define_netcdf_dimensions(hypercube *h, fieldset *fs, int ncid, datase
long date = d ? atol(d) : 0;
long hour = t ? atol(t) : 0;
long min = t ? 60 * (atof(t) - hour) : 0;
- sprintf(u, "hours since %ld-%02ld-%02ld %02ld:%02ld:0.0", date / 10000, (date % 10000) / 100, (date % 100), hour, min);
+ sprintf(u, "hours since %ld-%02ld-%02ld %02ld:%02ld:00.0", date / 10000, (date % 10000) / 100, (date % 100), hour, min);
units = u;
}
}
|
Fix control points in test case. | @@ -645,10 +645,10 @@ void derive_compare_third_derivative_with_three_times(CuTest *tc)
tsStatus status;
tsReal ctrlp[8];
- ctrlp[0] = 1.f; ctrlp[0] = 1.f;
- ctrlp[1] = 2.f; ctrlp[0] = 4.f;
- ctrlp[1] = 3.f; ctrlp[0] = 3.f;
- ctrlp[1] = 4.f; ctrlp[0] = 0.f;
+ ctrlp[0] = 1.f; ctrlp[1] = 1.f;
+ ctrlp[2] = 2.f; ctrlp[3] = 4.f;
+ ctrlp[4] = 3.f; ctrlp[5] = 3.f;
+ ctrlp[6] = 4.f; ctrlp[7] = 0.f;
TS_TRY(try, status.code, &status)
/* ================================= Given ================================= */
|
map: handle IPv6 extension headers for TCP/UDP
Without this patch offset for TCP/UDP headers was not calculated
correctly if there is one or more IPv6 extension headers.
Type: fix | @@ -345,7 +345,7 @@ map_ip6_to_ip4_tcp_udp (vlib_main_t * vm, vlib_buffer_t * p,
if (l4_protocol == IP_PROTOCOL_TCP)
{
- tcp_header_t *tcp = ip6_next_header (ip6);
+ tcp_header_t *tcp = (tcp_header_t *) u8_ptr_add (ip6, l4_offset);
if (mm->tcp_mss > 0)
{
csum = tcp->checksum;
@@ -356,7 +356,7 @@ map_ip6_to_ip4_tcp_udp (vlib_main_t * vm, vlib_buffer_t * p,
}
else
{
- udp_header_t *udp = ip6_next_header (ip6);
+ udp_header_t *udp = (udp_header_t *) u8_ptr_add (ip6, l4_offset);
checksum = &udp->checksum;
}
|
Update secure_comparator.c | *
* To prevent these situations, additional security proofs and verifications should be done on each step of the protocol.
* These proofs are implemented in functions below:
- * git s
+ *
* ed_sign / ed_verify -> Proof of knowledge of EC discrete logarithm (section 5.3.1 in paper);
* ed_dbl_base_sign / ed_dbl_base_verify -> Proof of knowledge of EC discrete coordinates (section 5.3.2 in paper);
* ed_point_sign / ed_point_verify -> Proof of knowledge of EC discrete logarithms (section 5.3.3 in paper).
|
fix(sensors): Use status filter on sensors node. | #pragma once
#define ZMK_KEYMAP_SENSORS_NODE DT_INST(0, zmk_keymap_sensors)
-#define ZMK_KEYMAP_HAS_SENSORS DT_NODE_EXISTS(ZMK_KEYMAP_SENSORS_NODE)
+#define ZMK_KEYMAP_HAS_SENSORS DT_NODE_HAS_STATUS(ZMK_KEYMAP_SENSORS_NODE, okay)
#define ZMK_KEYMAP_SENSORS_LEN DT_PROP_LEN(ZMK_KEYMAP_SENSORS_NODE, sensors)
#define ZMK_KEYMAP_SENSORS_BY_IDX(idx) DT_PHANDLE_BY_IDX(ZMK_KEYMAP_SENSORS_NODE, sensors, idx)
|
Fix suspending WmiPrvSE.exe causing Process Hacker to hang | @@ -356,25 +356,6 @@ PPH_STRING PhGetProcessTooltipText(
PhDeleteStringBuilder(&container);
}
break;
- case WmiProviderHostType:
- {
- PH_STRING_BUILDER provider;
-
- PhInitializeStringBuilder(&provider, 40);
-
- PhpFillWmiProviderHost(Process, &provider);
-
- if (provider.String->Length != 0)
- {
- PhAppendStringBuilder2(&stringBuilder, L"WMI Providers:\n");
- PhAppendStringBuilder(&stringBuilder, &provider.String->sr);
- }
-
- PhDeleteStringBuilder(&provider);
-
- validForMs = 10 * 1000; // 10 seconds
- }
- break;
}
// Plugin
|
feat(FM650):Add CC and AR for FM650 | #CC := $(CURDIR)/../../../build/usr/bin/arm-linux-gcc
#AR := $(CURDIR)/../../../build/usr/bin/arm-linux-ar
-CC := gcc
-AR := ar
+CC := $CC
+AR := $AR
# Commands
BOAT_RM := rm -rf
|
add comment for max segment number count for random table. | @@ -4633,6 +4633,10 @@ calculate_planner_segment_num(PlannedStmt *plannedstmt, Query *query,
} else {
maxTargetSegmentNumber = context.randomSegNum;
if(context.externTableLocationSegNum > 0 && maxTargetSegmentNumber < GetQueryVsegNum()){
+ /*
+ * adjust max segment number for random table by rm_nvseg_perquery_perseg_limit
+ * and rm_nvseg_perquery_limit.
+ */
maxTargetSegmentNumber = GetQueryVsegNum();
}
minTargetSegmentNumber = context.minimum_segment_num;
|
hark: remove extraneous "}" | @@ -89,7 +89,7 @@ export function Header(props: {
<Rule vertical height="12px" />
{groupTitle &&
<>
- <Text fontWeight="500">{groupTitle}</Text>}
+ <Text fontWeight="500">{groupTitle}</Text>
<Rule vertical height="12px"/>
</>
}
|
zephyr/shim/chip/mchp/system_download_from_flash.c: Format with clang-format
BRANCH=none
TEST=none | /* Modules Map */
#define WDT_NODE DT_INST(0, microchip_xec_watchdog)
-#define STRUCT_WDT_REG_BASE_ADDR \
- ((struct wdt_regs *)(DT_REG_ADDR(WDT_NODE)))
+#define STRUCT_WDT_REG_BASE_ADDR ((struct wdt_regs *)(DT_REG_ADDR(WDT_NODE)))
#define PCR_NODE DT_INST(0, microchip_xec_pcr)
#define STRUCT_PCR_REG_BASE_ADDR \
#define SPI_READ_111_FAST 0x0b
#define SPI_READ_112_FAST 0x3b
-#define QSPI_STATUS_DONE \
- (MCHP_QMSPI_STS_DONE | MCHP_QMSPI_STS_DMA_DONE)
+#define QSPI_STATUS_DONE (MCHP_QMSPI_STS_DONE | MCHP_QMSPI_STS_DMA_DONE)
#define QSPI_STATUS_ERR \
(MCHP_QMSPI_STS_TXB_ERR | MCHP_QMSPI_STS_RXB_ERR | \
@@ -102,15 +100,15 @@ void system_download_from_flash(uint32_t srcAddr, uint32_t dstAddr,
qspi->CTRL = BIT(MCHP_QMSPI_C_DESCR_EN_POS);
/* Transmit 4 bytes(opcode + 24-bit address) on IO0 */
- qspi->DESCR[0] = (MCHP_QMSPI_C_IFM_1X | MCHP_QMSPI_C_TX_DATA |
- MCHP_QMSPI_C_XFR_UNITS_1 |
- MCHP_QMSPI_C_XFR_NUNITS(4) |
+ qspi->DESCR[0] =
+ (MCHP_QMSPI_C_IFM_1X | MCHP_QMSPI_C_TX_DATA |
+ MCHP_QMSPI_C_XFR_UNITS_1 | MCHP_QMSPI_C_XFR_NUNITS(4) |
MCHP_QMSPI_C_NEXT_DESCR(1));
/* Transmit 8 clocks with IO0 and IO1 tri-stated */
- qspi->DESCR[1] = (MCHP_QMSPI_C_IFM_2X | MCHP_QMSPI_C_TX_DIS |
- MCHP_QMSPI_C_XFR_UNITS_1 |
- MCHP_QMSPI_C_XFR_NUNITS(2) |
+ qspi->DESCR[1] =
+ (MCHP_QMSPI_C_IFM_2X | MCHP_QMSPI_C_TX_DIS |
+ MCHP_QMSPI_C_XFR_UNITS_1 | MCHP_QMSPI_C_XFR_NUNITS(2) |
MCHP_QMSPI_C_NEXT_DESCR(2));
/* Read using LDMA RX Chan 0, IFM=2x, Last Descriptor, close */
|
Adding logging for startup timeout. | @@ -3925,21 +3925,6 @@ static int wsgi_execute_script(request_rec *r)
config = (WSGIRequestConfig *)ap_get_module_config(r->request_config,
&wsgi_module);
- /* Setup startup timeout if first request and specified. */
-
-#if defined(MOD_WSGI_WITH_DAEMONS)
- if (wsgi_daemon_process) {
- if (wsgi_startup_shutdown_time == 0) {
- if (wsgi_startup_timeout > 0) {
- apr_thread_mutex_lock(wsgi_monitor_lock);
- wsgi_startup_shutdown_time = apr_time_now();
- wsgi_startup_shutdown_time += wsgi_startup_timeout;
- apr_thread_mutex_unlock(wsgi_monitor_lock);
- }
- }
- }
-#endif
-
/*
* Acquire the desired python interpreter. Once this is done
* it is safe to start manipulating python objects.
@@ -3955,6 +3940,26 @@ static int wsgi_execute_script(request_rec *r)
return HTTP_INTERNAL_SERVER_ERROR;
}
+ /* Setup startup timeout if first request and specified. */
+
+#if defined(MOD_WSGI_WITH_DAEMONS)
+ if (wsgi_daemon_process) {
+ if (wsgi_startup_shutdown_time == 0) {
+ if (wsgi_startup_timeout > 0) {
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, wsgi_server,
+ "mod_wsgi (pid=%d): Application startup "
+ "timer triggered '%s'.", getpid(),
+ config->process_group);
+
+ apr_thread_mutex_lock(wsgi_monitor_lock);
+ wsgi_startup_shutdown_time = apr_time_now();
+ wsgi_startup_shutdown_time += wsgi_startup_timeout;
+ apr_thread_mutex_unlock(wsgi_monitor_lock);
+ }
+ }
+ }
+#endif
+
/*
* Use a lock around the check to see if the module is
* already loaded and the import of the module to prevent
@@ -4174,6 +4179,11 @@ static int wsgi_execute_script(request_rec *r)
#if defined(MOD_WSGI_WITH_DAEMONS)
if (module && wsgi_startup_shutdown_time > 0) {
wsgi_startup_shutdown_time = -1;
+
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, wsgi_server,
+ "mod_wsgi (pid=%d): Application startup "
+ "timer cancelled '%s'.", getpid(),
+ config->process_group);
}
#endif
|
Fix: tutorial.md should be correctly linked from readme | @@ -59,7 +59,7 @@ Supported operating systems are listed in [version_support.md](doc/version_suppo
## Tutorial & HOWTO
-Our [tutorial.md](doc/tutorial.md may help you along with some advanced tasks and additional info.
+Our [tutorial.md](doc/tutorial.md) may help you along with some advanced tasks and additional info.
## Installation
|
deconz backup: use correct deconz path for homebridge backup | @@ -15242,7 +15242,7 @@ bool DeRestPluginPrivate::exportConfiguration()
FirstFileName = files.at(0);
DBG_Printf(DBG_INFO, "copy file: %s to backup directory\n", qPrintable(FirstFileName));
QFile accessoryFile(homebridgePersistPath + "/" + FirstFileName);
- if (!accessoryFile.copy(appPath + "/" + FirstFileName))
+ if (!accessoryFile.copy(path + "/" + FirstFileName))
{
DBG_Printf(DBG_INFO, "copy file: %s failed. Do not include it in backup\n", qPrintable(FirstFileName));
FirstFileName = "";
@@ -15255,7 +15255,7 @@ bool DeRestPluginPrivate::exportConfiguration()
SecondFileName = files.at(1);
DBG_Printf(DBG_INFO, "copy file: %s to backup directory\n", qPrintable(SecondFileName));
QFile IdentifierFile(homebridgePersistPath + "/" + SecondFileName);
- if (!IdentifierFile.copy(appPath + "/" + SecondFileName))
+ if (!IdentifierFile.copy(path + "/" + SecondFileName))
{
DBG_Printf(DBG_INFO, "copy file: %s failed. Do not include it in backup\n", qPrintable(SecondFileName));
SecondFileName = "";
|
sysrepoctl BUGFIX avoid invalid memory access | @@ -516,12 +516,18 @@ srctl_change(sr_conn_ctx_t *conn, struct change_item *citem)
{
int r = 0, i;
- /* change owner, group, and/or permissions */
- if (citem->owner || citem->group || citem->perms) {
if (!strcmp(citem->module_name, ":ALL")) {
/* all the modules */
+ if (citem->features || citem->dis_features) {
+ error_print(0, "To enable/disable features, the module must be specified");
+ r = 1;
+ goto cleanup;
+ }
citem->module_name = NULL;
}
+
+ /* change owner, group, and/or permissions */
+ if (citem->owner || citem->group || citem->perms) {
if (citem->mod_ds == SR_MOD_DS_PLUGIN_COUNT) {
for (i = 0; i < SR_MOD_DS_PLUGIN_COUNT; ++i) {
if ((r = sr_set_module_ds_access(conn, citem->module_name, i, citem->owner, citem->group, citem->perms))) {
@@ -562,10 +568,6 @@ srctl_change(sr_conn_ctx_t *conn, struct change_item *citem)
/* change replay */
if (citem->replay != -1) {
- if (!strcmp(citem->module_name, ":ALL")) {
- /* all the modules */
- citem->module_name = NULL;
- }
if ((r = sr_set_module_replay_support(conn, citem->module_name, citem->replay))) {
error_print(r, "Failed to change replay support");
goto cleanup;
|
include text on relative OIDCRedirectURI in sample .conf | # The redirect_uri for this OpenID Connect client; this is a vanity URL
# that must ONLY point to a path on your server protected by this module
# but it must NOT point to any actual content that needs to be served.
+# You can use a relative URL like /protected/redirect_uri if you want to
+# support multiple vhosts that belong to the same security domain in a dynamic way
#OIDCRedirectURI https://www.example.com/protected/redirect_uri
# (Mandatory)
# (Optional)
# Specify the domain for which the "state" and "session" cookies will be set.
# This must match the OIDCRedirectURI and the URL on which you host your protected
-# application. When not defined the default is the server hostname.
+# application. When using a relative OIDCRedirectURI this setting should most probably empty.
+# When not defined the default is the server hostname that is currently accessed.
#OIDCCookieDomain <cookie-domain>
# (Optional)
|
Add wording to limit the 'size' parameter to no more than can be specified using a size_t variable | @@ -210,13 +210,13 @@ This option is used by KMAC.
These will set the MAC flags to the given numbers.
Some MACs do not support this option.
-=item B<OSSL_MAC_PARAM_ENGINE> ("engine") <utf8 string>
+=item B<OSSL_MAC_PARAM_ENGINE> ("engine") <UTF8 string>
-=item B<OSSL_MAC_PARAM_PROPERTIES> ("properties") <utf8 string>
+=item B<OSSL_MAC_PARAM_PROPERTIES> ("properties") <UTF8 string>
-=item B<OSSL_MAC_PARAM_DIGEST> ("digest") <utf8 string>
+=item B<OSSL_MAC_PARAM_DIGEST> ("digest") <UTF8 string>
-=item B<OSSL_MAC_PARAM_CIPHER> ("cipher") <utf8 string>
+=item B<OSSL_MAC_PARAM_CIPHER> ("cipher") <UTF8 string>
For MAC implementations that use an underlying computation cipher or
digest, these parameters set what the algorithm should be, and the
@@ -234,7 +234,8 @@ or SHAKE256.
For MAC implementations that support it, set the output size that
EVP_MAC_final() should produce.
-The allowed sizes vary between MAC implementations.
+The allowed sizes vary between MAC implementations, but must never exceed
+what can be given with a B<size_t>.
=back
|
Minor doc fix for EVP_PKEY_CTX_new_from_pkey | @@ -16,7 +16,8 @@ EVP_PKEY_CTX_new_from_pkey, EVP_PKEY_CTX_dup, EVP_PKEY_CTX_free
const char *name,
const char *propquery);
EVP_PKEY_CTX *EVP_PKEY_CTX_new_from_pkey(OPENSSL_CTX *libctx,
- EVP_PKEY *pkey);
+ EVP_PKEY *pkey,
+ const char *propquery);
EVP_PKEY_CTX *EVP_PKEY_CTX_dup(const EVP_PKEY_CTX *ctx);
void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx);
|
Test ID attribute indexing | @@ -1479,6 +1479,7 @@ typedef struct attrInfo {
typedef struct elementInfo {
const char *name;
int attr_count;
+ const char *id_name;
AttrInfo *attributes;
} ElementInfo;
@@ -1489,8 +1490,7 @@ counting_start_element_handler(void *userData,
{
ElementInfo *info = (ElementInfo *)userData;
AttrInfo *attr;
- int count;
- int i;
+ int count, id, i;
while (info->name != NULL) {
if (!strcmp(name, info->name))
@@ -1505,6 +1505,15 @@ counting_start_element_handler(void *userData,
fail("Not got expected attribute count");
return;
}
+ id = XML_GetIdAttributeIndex(parser);
+ if (id == -1 && info->id_name != NULL) {
+ fail("ID not present");
+ return;
+ }
+ if (id != -1 && strcmp(atts[id], info->id_name)) {
+ fail("ID does not have the correct name");
+ return;
+ }
for (i = 0; i < info->attr_count; i++) {
attr = info->attributes;
while (attr->name != NULL) {
@@ -1526,20 +1535,28 @@ counting_start_element_handler(void *userData,
START_TEST(test_attributes)
{
- const char *text = "<tag1 a='1' b='2'><tag2 c='3'/></tag1>";
- AttrInfo tag1_info[] = {
+ const char *text =
+ "<!DOCTYPE doc [\n"
+ "<!ELEMENT doc (tag)>\n"
+ "<!ATTLIST doc id ID #REQUIRED>\n"
+ "]>"
+ "<doc a='1' id='one' b='2'>"
+ "<tag c='3'/>"
+ "</doc>";
+ AttrInfo doc_info[] = {
{ "a", "1" },
{ "b", "2" },
+ { "id", "one" },
{ NULL, NULL }
};
- AttrInfo tag2_info[] = {
+ AttrInfo tag_info[] = {
{ "c", "3" },
{ NULL, NULL }
};
ElementInfo info[] = {
- { "tag1", 2, tag1_info },
- { "tag2", 1, tag2_info },
- { NULL, 0, NULL }
+ { "doc", 3, "id", doc_info },
+ { "tag", 1, NULL, tag_info },
+ { NULL, 0, NULL, NULL }
};
XML_SetStartElementHandler(parser, counting_start_element_handler);
|
release build crash fix | @@ -618,7 +618,7 @@ void InitXRenderD3D9()
{
std::tuple<Address, void*> operator()()
{
- static float x1, y1, x2, y2;
+ static volatile float x1, y1, x2, y2;
static uint8_t buffer[300];
injector::ProtectMemory(buffer, sizeof(buffer), PAGE_EXECUTE_READWRITE);
|
CBLK: Adding support to block on busy slots for r and w - untested | @@ -706,6 +706,14 @@ static int block_read(struct cblk_dev *c, void *buf, off_t lba,
pthread_mutex_lock(&c->dev_lock);
+ while (c->r_in_flight == CBLK_WIDX_MAX) { /* block in case of busy hardware */
+ pthread_mutex_unlock(&c->dev_lock);
+ block_trace(" [%s] wait for free slot\n", __func__);
+ sem_wait(&c->idle_sem);
+ block_trace(" [%s] check if we have a free slot\n", __func__);
+ pthread_mutex_lock(&c->dev_lock);
+ }
+
slot = CBLK_WIDX_MAX + c->ridx;
req = &c->req[slot];
@@ -741,6 +749,7 @@ static int block_read(struct cblk_dev *c, void *buf, off_t lba,
c->r_in_flight--;
c->ridx = (c->ridx + 1) % CBLK_RIDX_MAX; /* pick next slot */
+ sem_post(&c->idle_sem); /* kick potential waiters */
pthread_mutex_unlock(&c->dev_lock);
block_trace("[%s] exit lba=%zu nblocks=%zu\n", __func__, lba, nblocks);
@@ -788,6 +797,14 @@ static int block_write(struct cblk_dev *c, void *buf, off_t lba,
pthread_mutex_lock(&c->dev_lock);
+ while (c->w_in_flight == CBLK_WIDX_MAX) { /* block in case of busy hardware */
+ pthread_mutex_unlock(&c->dev_lock);
+ block_trace(" [%s] wait for free slot\n", __func__);
+ sem_wait(&c->idle_sem);
+ block_trace(" [%s] check if we have a free slot\n", __func__);
+ pthread_mutex_lock(&c->dev_lock);
+ }
+
slot = c->widx;
req = &c->req[slot];
@@ -821,6 +838,7 @@ static int block_write(struct cblk_dev *c, void *buf, off_t lba,
c->w_in_flight--;
c->widx = (c->widx + 1) % CBLK_WIDX_MAX; /* pick next slot */
+ sem_post(&c->idle_sem); /* kick potential waiters */
pthread_mutex_unlock(&c->dev_lock);
block_trace("[%s] exit lba=%zu nblocks=%zu\n", __func__, lba, nblocks);
|
DEV_CheckItemChanges: support REventPoll and REventAwake | @@ -65,9 +65,25 @@ void DEV_InitStateHandler(Device *device, const Event &event)
}
void DEV_CheckItemChanges(Device *device, const Event &event)
+{
+ std::vector<Resource*> subDevices;
+
+ if (event.what() == REventAwake || event.what() == REventPoll)
+ {
+ subDevices = device->subDevices();
+ }
+ else
{
auto *sub = DEV_GetSubDevice(device, event.resource(), event.id());
+ if (sub)
+ {
+ subDevices.push_back(sub);
+ }
+ }
+
+ for (auto *sub : subDevices)
+ {
if (sub && !sub->stateChanges().empty())
{
auto *item = sub->item(event.what());
@@ -83,6 +99,7 @@ void DEV_CheckItemChanges(Device *device, const Event &event)
sub->cleanupStateChanges();
}
}
+}
void DEV_IdleStateHandler(Device *device, const Event &event)
{
|
SOVERSION bump to version 2.8.18 | @@ -67,7 +67,7 @@ set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_
# set version of the library
set(LIBYANG_MAJOR_SOVERSION 2)
set(LIBYANG_MINOR_SOVERSION 8)
-set(LIBYANG_MICRO_SOVERSION 17)
+set(LIBYANG_MICRO_SOVERSION 18)
set(LIBYANG_SOVERSION_FULL ${LIBYANG_MAJOR_SOVERSION}.${LIBYANG_MINOR_SOVERSION}.${LIBYANG_MICRO_SOVERSION})
set(LIBYANG_SOVERSION ${LIBYANG_MAJOR_SOVERSION})
|
use dos2unix to fix newline problem on _xmake_main.lua | @@ -29,6 +29,10 @@ build_script:
- cmd: core\build\xmake lua versioninfo
- ps: Write-Output "require('luacov.runner').init({['statsfile']='$PWD/luacov.stats.out',['reportfile']='$PWD/luacov.report.out'})".replace('\','/') | Out-File tmp
- ps: Write-Output (Get-Content xmake\core\_xmake_main.lua | Out-String) | Out-File tmp -Append
+ - ps: Invoke-Webrequest 'https://svwh.dl.sourceforge.net/project/dos2unix/dos2unix/7.3.4/dos2unix-7.3.4-win32.zip' -OutFile dos2unix.zip
+ - ps: Expand-Archive dos2unix.zip
+ - cmd: dos2unix\bin\dos2unix tmp
+ - ps: Remove-Item -Recurse dos2unix,dos2unix.zip
- ps: Move-Item -Force tmp xmake\core\_xmake_main.lua
- ps: Copy-Item -Force core\build\xmake.exe $HOME\xmake
- cmd: xmake lua tests\test.lua
|
doc: build server, small changes
see | @@ -86,20 +86,21 @@ you can do:
git-ref-log # recover
-## Github
+## Build Server
When doing merge requests our [buildserver](https://build.libelektra.org)
-will build authorized users. If you are not yet authorized, the following
-question will be asked (by user markus2330):
+will build jobs of authorized users. If you are not yet authorized, the following
+question will be asked (by user @markus2330):
Can one of the admins verify if this patch should be build?
-Then one of the admins:
+Then one of the admins (sorted by activity):
-- fberlakovich
-- manuelm
-- markus2330
-- beku
+- @sanssecours
+- @markus2330
+- @beku
+- @fberlakovich
+- @manuelm
need to confirm by saying:
@@ -109,11 +110,9 @@ or if just the pull request should be checked:
.*build\W+allow.*
-or if just a single build of the mergerequest should be started:
+### Run Jobs
- jenkins build please
-
-or if specific jobs should be started:
+After being added to whitelist you can trigger buildjobs by saying:
* jenkins build [bindings](https://build.libelektra.org/job/elektra-test-bindings/) please
* jenkins build [clang](https://build.libelektra.org/job/elektra-clang/) please
@@ -152,27 +151,24 @@ or if specific jobs should be started:
* jenkins build [gcc-configure-debian-stretch-minimal](https://build.libelektra.org/job/elektra-gcc-configure-debian-stretch-minimal/) please
* jenkins build [gcc-configure-debian-jessie-minimal](https://build.libelektra.org/job/elektra-gcc-configure-debian-jessie-minimal/) please
-If you want any configuration changes, please contact
-`Markus Raab <[email protected]>`.
-
### Run All Tests
-Before we merge a pull request we want to make sure, that all of the build jobs mentioned above still work. For this purpose we provide the
-phrase:
+Before we merge a pull request we want to make sure, that all of the build jobs mentioned above still work.
+For this purpose we provide the phrase:
```
jenkins build all please
```
-. If you add this phrase to a comment in your pull request, then Jenkins will run all jobs, except for
+If you add this phrase to a comment in your pull request, then Jenkins will run all jobs, except for
- `elektra-git-buildpackage-jessie`,
- `elektra-git-buildpackage-stretch`, and
- `elektra-git-buildpackage-wheezy`,
-. Since running all test jobs takes a lot of time, please use this phrase only if
+Since running all test jobs needs resources, please use this phrase only if
- all of the **standard PR jobs** were already **successful**, and
- you are sure that you **do not want change anything** in your PR anymore
-.
+If you want any changes to the build server infrastructure, please [report them](https://issues.libelektra.org/160).
|
Recalculate group any_on state attribute after setting group members | @@ -517,6 +517,9 @@ int DeRestPluginPrivate::setGroupAttributes(const ApiRequest &req, ApiResponse &
rspItem["success"] = rspItemState;
rsp.list.append(rspItem);
+ Event e(RGroups, REventCheckGroupAnyOn, int(group->address()));
+ enqueueEvent(e);
+
// for each node which are currently in the group but not in the list send a remove group command (unicast)
// note: nodes which are currently switched off will not be removed from the group
std::vector<LightNode>::iterator j = nodes.begin();
|
Update zgemm3m_kernel_4x4_haswell.c | "33105"#ndim":\n\t"\
"movq %%r13,%4; movq %%r14,%1; movq %%r11,%7;"\
:"+r"(a_pointer),"+r"(b_pointer),"+r"(c_pointer),"+r"(ldc_in_bytes),"+r"(K),"+r"(ctemp),"+r"(const_val),"+r"(M),"+r"(next_b)\
- ::"r11","r12","r13","r14","r15","ymm0","ymm1","ymm2","ymm3","ymm4","ymm5","ymm6","ymm7","ymm8","ymm9","ymm10","ymm11","ymm12","ymm13","ymm14",\
- "ymm15","cc","memory");\
+ ::"r11","r12","r13","r14","r15","xmm0","xmm1","xmm2","xmm3","xmm4","xmm5","xmm6","xmm7","xmm8","xmm9","xmm10","xmm11","xmm12","xmm13","xmm14",\
+ "xmm15","cc","memory");\
a_pointer -= M * K; b_pointer += ndim * K; c_pointer += 2*(LDC * ndim - M);\
}
int __attribute__ ((noinline))
|
Use C memset/memcpy for CLi upper-layer stack | @@ -49,7 +49,7 @@ static uint32_t cmd_history_full;
*/
static void
clear_cmd_buffer( void ) {
- ESP_MEMSET(cmd_buffer, 0x0, sizeof(cmd_buffer));
+ memset(cmd_buffer, 0x0, sizeof(cmd_buffer));
cmd_pos = 0;
}
@@ -61,13 +61,13 @@ store_command_to_history( void ) {
uint32_t hist_count;
if (strcmp(cmd_history_buffer[0], cmd_buffer)) {
for (hist_count = CLI_CMD_HISTORY-1; hist_count > 0; hist_count--) {
- ESP_MEMCPY(cmd_history_buffer[hist_count], cmd_history_buffer[hist_count-1], CLI_MAX_CMD_LENGTH);
+ memcpy(cmd_history_buffer[hist_count], cmd_history_buffer[hist_count-1], CLI_MAX_CMD_LENGTH);
}
cmd_history_full++;
if (cmd_history_full > CLI_CMD_HISTORY) {
cmd_history_full = CLI_CMD_HISTORY;
}
- ESP_MEMCPY(cmd_history_buffer[0], cmd_buffer, CLI_MAX_CMD_LENGTH);
+ memcpy(cmd_history_buffer[0], cmd_buffer, CLI_MAX_CMD_LENGTH);
cmd_history_buffer[0][CLI_MAX_CMD_LENGTH-1] = '\0';
}
}
@@ -104,7 +104,7 @@ cli_special_key_check(cli_printf cliprintf, char ch) {
case 'A': /* Up */
if (cmd_history_pos < cmd_history_full) {
/* Clear the line */
- ESP_MEMSET(cmd_buffer, ' ', cmd_pos);
+ memset(cmd_buffer, ' ', cmd_pos);
cliprintf("\r%s \r" CLI_PROMPT, cmd_buffer);
strcpy(cmd_buffer, cmd_history_buffer[cmd_history_pos]);
@@ -119,7 +119,7 @@ cli_special_key_check(cli_printf cliprintf, char ch) {
case 'B': /* Down */
if (cmd_history_pos) {
/* Clear the line */
- ESP_MEMSET(cmd_buffer, ' ', cmd_pos);
+ memset(cmd_buffer, ' ', cmd_pos);
cliprintf("\r%s \r" CLI_PROMPT, cmd_buffer);
if (--cmd_history_pos != 0) {
|
Raycaster: Low settings for all Pico builds | @@ -8,7 +8,7 @@ constexpr float M_PI_H = 1.5707963267948966f;
constexpr float EPSILON = 0.00000001f;
-#ifdef DISPLAY_ST7789
+#ifdef PICO_BOARD
constexpr uint16_t OFFSET_TOP = 30;
constexpr uint16_t SCREEN_WIDTH = 120;
constexpr uint16_t SCREEN_HEIGHT = 120;
|
delete svn_credentials dir | @@ -32,7 +32,7 @@ def ytest_base(unit, related_prj_dir, related_prj_name, args):
ya_root = unit.get('YA_ROOT')
unit.set(['TEST_RUN_SCRIPT', 'devtools/{}/test/node/run_test.py'.format(ya_root)])
- related_dirs_list = ['${ARCADIA_ROOT}/devtools/svn_credentials', '{ARCADIA_ROOT}/devtools/${YA_ROOT}', '${ARCADIA_ROOT}/devtools/${YA_ROOT}', '$RELATED_TARGET_SRCDIR']
+ related_dirs_list = ['{ARCADIA_ROOT}/devtools/${YA_ROOT}', '${ARCADIA_ROOT}/devtools/${YA_ROOT}', '$RELATED_TARGET_SRCDIR']
related_dirs_value = []
for rel in related_dirs_list:
related_dirs_value.extend(['--test-related-path', rel])
|
iokernel: perfer->prefer. | @@ -405,19 +405,19 @@ static void mis_sample_pmc(uint64_t sel)
/* don't let PMC req hurts the kthread that cannot be kicked out */
if (sd1_no_kick_out && sd2_no_kick_out)
continue;
- bool perfer_sample_sd2 = false;
+ bool prefer_sample_sd2 = false;
if (!sd2) {
- perfer_sample_sd2 = true;
+ prefer_sample_sd2 = true;
} else if (!sd1) {
- perfer_sample_sd2 = false;
+ prefer_sample_sd2 = false;
} else if (sd1_no_kick_out && !sd2_no_kick_out) {
- perfer_sample_sd2 = true;
+ prefer_sample_sd2 = true;
} else if (!sd1_no_kick_out && sd2_no_kick_out) {
- perfer_sample_sd2 = false;
+ prefer_sample_sd2 = false;
} else if (sd1->threads_monitored <= sd2->threads_monitored) {
- perfer_sample_sd2 = true;
+ prefer_sample_sd2 = true;
}
- if (perfer_sample_sd2) {
+ if (prefer_sample_sd2) {
sd1->threads_monitored++;
ksched_enqueue_pmc(sib, sel);
bitmap_set(mis_sampled_cores, sib);
|
fix a minor bug of s_client
CLA: trivial
CAstore's option should be OPT_CASTORE, instead of OPT_CAFILE
correct also -no-CAstore option from OPT_NOCAPATH to OPT_NOCASTORE | @@ -659,12 +659,12 @@ const OPTIONS s_client_options[] = {
{"pass", OPT_PASS, 's', "Private key file pass phrase source"},
{"CApath", OPT_CAPATH, '/', "PEM format directory of CA's"},
{"CAfile", OPT_CAFILE, '<', "PEM format file of CA's"},
- {"CAstore", OPT_CAFILE, ':', "URI to store of CA's"},
+ {"CAstore", OPT_CASTORE, ':', "URI to store of CA's"},
{"no-CAfile", OPT_NOCAFILE, '-',
"Do not load the default certificates file"},
{"no-CApath", OPT_NOCAPATH, '-',
"Do not load certificates from the default certificates directory"},
- {"no-CAstore", OPT_NOCAPATH, '-',
+ {"no-CAstore", OPT_NOCASTORE, '-',
"Do not load certificates from the default certificates store"},
{"requestCAfile", OPT_REQCAFILE, '<',
"PEM format file of CA names to send to the server"},
|
small update in intro section | @@ -53,8 +53,6 @@ The Core Cosmology Library (\ccl) provides routines to compute basic cosmologica
\label{sec:intro}
\vol{Mustapha Ishak}
-\todo{Use CCL plot from SRM}
-
In preparation for constraining cosmology with the Large Synoptic Survey Telescope (LSST), it is necessary to be able to produce rigorous theoretical predictions for the cosmological quantities that will be measured. The Core Cosmology Library\footnote{\url{https://github.com/LSSTDESC/CCL}} (\ccl) aims to provide, in one library, a way of making predictions that are validated to a well-documented numerical accuracy, for the purpose of constraining cosmology with LSST. By constructing a cosmology library specifically with LSST in mind, it is possible to ensure that it is flexible, adaptable, and validated for all cases of interest, as well as user-friendly and appropriate for the needs of all working groups.
\ccl structure is illustrated in figure \ref{fig:CCC_structure}.
|
test/params_test.c: use TEST_double_eq to check doubles
TEST_ulong_eq was used previously because TEST_double_eq didn't exist
at the time. | @@ -469,7 +469,7 @@ static int test_case_variant(const OSSL_PARAM *params,
if (!TEST_true(prov->get_params(obj, params))
|| !TEST_int_eq(app_p1, p1_init) /* "provider" value */
- || !TEST_ulong_eq(app_p2, app_p2_init) /* Should remain untouched */
+ || !TEST_double_eq(app_p2, app_p2_init) /* Should remain untouched */
|| !TEST_ptr(BN_native2bn(bignumbin, bignumbin_l, app_p3))
|| !TEST_BN_eq(app_p3, verify_p3) /* "provider" value */
|| !TEST_str_eq(app_p4, p4_init) /* "provider" value */
@@ -491,7 +491,7 @@ static int test_case_variant(const OSSL_PARAM *params,
struct object_st *sneakpeek = obj;
if (!TEST_int_eq(sneakpeek->p1, app_p1) /* app value set */
- || !TEST_ulong_eq(sneakpeek->p2, p2_init) /* Should remain untouched */
+ || !TEST_double_eq(sneakpeek->p2, p2_init) /* Should remain untouched */
|| !TEST_BN_eq(sneakpeek->p3, app_p3) /* app value set */
|| !TEST_str_eq(sneakpeek->p4, app_p4) /* app value set */
|| !TEST_str_eq(sneakpeek->p5, app_p5)) /* app value set */
@@ -512,7 +512,7 @@ static int test_case_variant(const OSSL_PARAM *params,
if (!TEST_true(prov->get_params(obj, params))
|| !TEST_int_eq(app_p1, app_p1_init) /* app value */
- || !TEST_ulong_eq(app_p2, app_p2_init) /* Should remain untouched */
+ || !TEST_double_eq(app_p2, app_p2_init) /* Should remain untouched */
|| !TEST_ptr(BN_native2bn(bignumbin, bignumbin_l, app_p3))
|| !TEST_BN_eq(app_p3, verify_p3) /* app value */
|| !TEST_str_eq(app_p4, app_p4_init) /* app value */
|
mdns: Fix issue with some mDNS parsers
Some mDNS parser have issue with zero terminated TXT lists. This fix targets to overcome this issue. Found and tested with jmdns. | @@ -803,7 +803,7 @@ static uint16_t _mdns_append_txt_record(uint8_t * packet, uint16_t * index, mdns
record_length += part_length;
uint16_t data_len_location = *index - 2;
- uint16_t data_len = 1;
+ uint16_t data_len = 0;
char * tmp;
mdns_txt_linked_item_t * txt = service->txt;
@@ -820,9 +820,11 @@ static uint16_t _mdns_append_txt_record(uint8_t * packet, uint16_t * index, mdns
}
txt = txt->next;
}
-
+ if (!data_len) {
+ data_len = 1;
packet[*index] = 0;
*index = *index + 1;
+ }
_mdns_set_u16(packet, data_len_location, data_len);
record_length += data_len;
return record_length;
|
Add missing NULL check in ble-l2cap. | @@ -378,11 +378,16 @@ input_l2cap_credit(uint8_t *data)
uint16_t credits;
l2cap_channel_t *channel = get_channel_for_addr(packetbuf_addr(PACKETBUF_ADDR_SENDER));
+ if(channel == NULL) {
+ LOG_WARN("input_l2cap_credit: no channel found for sender address\n");
+ return;
+ }
+
/* uint8_t identifier = data[0]; */
memcpy(&len, &data[1], 2);
if(len != 4) {
- LOG_WARN("process_l2cap_credit: invalid len: %d\n", len);
+ LOG_WARN("input_l2cap_credit: invalid len: %d\n", len);
return;
}
|
don't crash when dumping logs from shell. Dump full logs. | @@ -71,6 +71,7 @@ int
shell_log_dump_all_cmd(int argc, char **argv)
{
struct log *log;
+ struct log_offset log_offset;
int rc;
log = NULL;
@@ -86,7 +87,12 @@ shell_log_dump_all_cmd(int argc, char **argv)
console_printf("Dumping log %s\n", log->l_name);
- rc = log_walk(log, shell_log_dump_entry, NULL);
+ log_offset.lo_arg = NULL;
+ log_offset.lo_ts = 0;
+ log_offset.lo_index = 0;
+ log_offset.lo_data_len = 0;
+
+ rc = log_walk(log, shell_log_dump_entry, &log_offset);
if (rc != 0) {
goto err;
}
|
[core] fix compiler warning in 32-bit build | @@ -371,7 +371,7 @@ ck_backtrace (FILE *fp)
}
fprintf(fp, "%.2u: [%.012lx] (+%04x) %s\n",
- frame, (uintptr_t)ip, (unsigned int)offset, name);
+ frame,(long unsigned)(uintptr_t)ip,(unsigned int)offset,name);
}
if (0 == rc)
return;
|
docs(scroll) fix small problem | @@ -64,7 +64,7 @@ Besides managing "normal" scrolling there are many interesting and useful additi
### Scrollable
-It's possible to make an object non-scrollable with `lv_obj_add_flag(obj, LV_OBJ_FLAG_SCROLLABLE)`.
+It's possible to make an object non-scrollable with `lv_obj_clear_flag(obj, LV_OBJ_FLAG_SCROLLABLE)`.
Non-scrollable object can still propagate the scrolling (chain) to the parents.
@@ -154,7 +154,7 @@ if(event_code == LV_EVENT_GET_SELF_SIZE) {
p->x = 200; //Set or calculate the self width
}
- if(p->x >= 0) {
+ if(p->y >= 0) {
p->y = 50; //Set or calculate the self height
}
}
|
crypto/provider_core.c: fix a couple of faulty ERR_raise_data() calls | @@ -284,7 +284,7 @@ OSSL_PROVIDER *ossl_provider_new(OSSL_LIB_CTX *libctx, const char *name,
if ((prov = ossl_provider_find(libctx, name,
noconfig)) != NULL) { /* refcount +1 */
ossl_provider_free(prov); /* refcount -1 */
- ERR_raise_data(ERR_LIB_CRYPTO, CRYPTO_R_PROVIDER_ALREADY_EXISTS, NULL,
+ ERR_raise_data(ERR_LIB_CRYPTO, CRYPTO_R_PROVIDER_ALREADY_EXISTS,
"name=%s", name);
return NULL;
}
@@ -534,7 +534,7 @@ static int provider_activate(OSSL_PROVIDER *prov)
if (prov->init_function == NULL
|| !prov->init_function((OSSL_CORE_HANDLE *)prov, core_dispatch,
&provider_dispatch, &tmp_provctx)) {
- ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INIT_FAIL, NULL,
+ ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INIT_FAIL,
"name=%s", prov->name);
#ifndef FIPS_MODULE
DSO_free(prov->module);
|
free SSL* asynchronously | @@ -1592,10 +1592,10 @@ static void on_handshake_fail_complete(h2o_socket_t *sock, const char *err)
static void proceed_handshake(h2o_socket_t *sock, const char *err);
#if PTLS_OPENSSL_HAVE_ASYNC
-static void ptls_free_async(void *data)
+static void openssl_ssl_free_async(void *data)
{
- ptls_t *tls = data;
- ptls_free(tls);
+ SSL *ossl = data;
+ SSL_free(ossl);
}
static void proceed_handshake_async(void *data)
@@ -1767,11 +1767,13 @@ Redo:
/* sent async request, reset the ssl state, and wait for async response */
assert(ret < 0);
#if PTLS_OPENSSL_HAVE_ASYNC
- while (SSL_waiting_for_async(sock->ssl->ossl)) {
- SSL_accept(sock->ssl->ossl);
- }
+ if (SSL_get_error(sock->ssl->ossl, ret) == SSL_ERROR_WANT_ASYNC) {
+ do_openssl_async(h2o_socket_get_loop(sock), sock->ssl->ossl, openssl_ssl_free_async, sock->ssl->ossl);
+ } else
#endif
+ {
SSL_free(sock->ssl->ossl);
+ }
create_ossl(sock);
if (has_pending_ssl_bytes(sock->ssl))
dispose_ssl_output_buffer(sock->ssl);
|
Support for spritesheets in screenshot viewer | @@ -196,10 +196,10 @@ void load_file_list(std::string directory) {
continue;
}
- if(ext == "bmp") {
+ if(ext == "bmp" || ext == "spritepk" || ext == "spriterw") {
GameInfo game;
game.type = GameType::screenshot;
- game.title = file.name.substr(0, file.name.length() - 4);
+ game.title = file.name.substr(0, file.name.length() - ext.length() - 1);
game.filename = directory == "/" ? file.name : directory + "/" + file.name;
game.size = file.size;
game_list.push_back(game);
@@ -397,6 +397,10 @@ void render(uint32_t time) {
if(!game_list.empty() && selected_game.type == GameType::screenshot && screenshot) {
if(screenshot->bounds.w == screen.bounds.w) {
screen.blit(screenshot, Rect(Point(0, 0), screenshot->bounds), Point(0, 0));
+ } else if(screenshot->bounds == Size(128, 128)) {
+ screen.pen = Pen(0, 0, 0, 255);
+ screen.rectangle(Rect(game_info_offset, Size(128, 128)));
+ screen.blit(screenshot, Rect(Point(0, 0), screenshot->bounds), game_info_offset);
} else {
screen.stretch_blit(screenshot, Rect(Point(0, 0), screenshot->bounds), Rect(Point(0, 0), screen.bounds));
}
|
Update return comment for initializePrivacyGuard | @@ -20,7 +20,7 @@ public class PrivacyGuard {
* Initialize Privacy Guard from Logger
* @param loggerInstance Logger instance that will be used to send data concerns to
* @param dataContext Common Data Context to initialize Privacy Guard with.
- * @return True if Privacy Guard has not been initialized before, False otherwise.
+ * @return true if Privacy Guard is successfully initialized, false otherwise. Try UnInit before re-init.
* @throws IllegalArgumentException if loggerInstance is null.
*/
public static boolean initializePrivacyGuard(Logger loggerInstance, final CommonDataContext dataContext)
|
Performance: optimise call to grib_context_log (stack) | @@ -909,16 +909,19 @@ void grib_context_set_data_accessing_proc(grib_context* c, grib_data_read_proc r
c->tell = tell;
}
-/* logging procedure */
+/* Logging procedure */
void grib_context_log(const grib_context *c,int level, const char* fmt, ...)
{
- char msg[1024];
- va_list list;
-
/* Save some CPU */
if( (level == GRIB_LOG_DEBUG && c->debug<1) ||
(level == GRIB_LOG_WARNING && c->debug<2) )
+ {
return;
+ }
+ else
+ {
+ char msg[1024];
+ va_list list;
va_start(list,fmt);
vsprintf(msg, fmt, list);
@@ -943,12 +946,12 @@ void grib_context_log(const grib_context *c,int level, const char* fmt, ...)
#endif
}
-
if(c->output_log)
c->output_log(c,level,msg);
}
+}
-/* logging procedure */
+/* Logging procedure */
void grib_context_print(const grib_context *c, void* descriptor,const char* fmt, ...)
{
char msg[1024];
|
Add switch namespace check for root permission | @@ -781,6 +781,11 @@ main(int argc, char **argv, char **env)
* - fork & execute static loader attach one more time with update PID
*/
if (nsIsPidInChildNs(pid, &nsAttachPid) == TRUE) {
+ // must be root to switch namespace
+ if (scope_getuid()) {
+ scope_printf("error: --attach requires root\n");
+ return EXIT_FAILURE;
+ }
return nsForkAndExec(pid, nsAttachPid);
}
}
|
Moved deb packaging deps to run section as sudo. | @@ -60,10 +60,10 @@ jobs:
# Produce a binary artifact and place it in the mounted volume
run: |
- apt-get install -q -y wget lsb-release
- wget https://deb.goaccess.io/provision/provision.sh
- chmod +x ./provision.sh
- sh provision.sh
+ sudo apt-get install -y wget lsb-release
+ sudo wget https://deb.goaccess.io/provision/provision.sh
+ sudo chmod +x ./provision.sh
+ sudo sh provision.sh
echo "Produced artifact at /artifacts/${artifact_name}"
- name: Show the artifact
|
Mercator: move a variable definition for non-C99 compilers | @@ -461,6 +461,7 @@ void cb_endFrame(PORT_TIMER_WIDTH timestamp) {
RF_PACKET_ht* rx_temp;
bool is_expected = TRUE;
IND_RX_ht* resp;
+ int i;
radio_rfOff();
@@ -496,7 +497,7 @@ void cb_endFrame(PORT_TIMER_WIDTH timestamp) {
}
// check txfillbyte
- for (int i = offsetof(RF_PACKET_ht, txfillbyte);
+ for (i = offsetof(RF_PACKET_ht, txfillbyte);
i < mercator_vars.rxpk_len - LENGTH_CRC; i++){
if(mercator_vars.rxpk_buf[i] != mercator_vars.txpk_txfillbyte){
is_expected = FALSE;
|
docs - remove .gphostcache file from docs
doc change for dev PR | master and all of the segment instances). The <codeph>gpstart</codeph> utility
handles the startup of the individual instances. Each instance is started in
parallel.</p>
- <p>The first time an administrator runs <codeph>gpstart</codeph>, the utility creates a
- hosts cache file named <codeph>.gphostcache</codeph> in the user's home directory.
- Subsequently, the utility uses this list of hosts to start the system more
- efficiently. If new hosts are added to the system, you must manually remove this
- file from the <codeph>gpadmin</codeph> user's home directory. The utility will
- create a new hosts cache file at the next startup.</p>
<p>As part of the startup process, the utility checks the consistency of heap checksum
setting among the Greenplum Database master and segment instances, either enabled or
disabled on all instances. If the heap checksum setting is different among the
|
Disable mingw-w64. | @@ -12,9 +12,9 @@ environment:
GENERATOR: MinGW Makefiles
PLATFORM: Win32
- - COMPILER: mingw-w64
- GENERATOR: MinGW Makefiles
- PLATFORM: x64
+ #- COMPILER: mingw-w64
+ #GENERATOR: MinGW Makefiles
+ #PLATFORM: x64
- COMPILER: msvc
GENERATOR: Visual Studio 15 2017
|
tests: handle unicode charactes in cli output
Type: fix | @@ -358,7 +358,8 @@ class VppPapiProvider(object):
:param cli: CLI to execute
:returns: CLI output
"""
- return cli + "\n" + str(self.cli(cli))
+ return cli + "\n" + self.cli(cli).encode('ascii',
+ errors='backslashreplace')
def want_ip4_arp_events(self, enable_disable=1, ip="0.0.0.0"):
return self.api(self.papi.want_ip4_arp_events,
|
Fix minor errata in audio utc
The value of fd can be 0.
Comparison of pointers should only use =, != | @@ -615,7 +615,7 @@ static void utc_audio_pcm_readi_p(void)
TC_ASSERT_NEQ_CLEANUP("pcm_readi", buffer, NULL, clean_all_data(0, NULL));
fd = open(AUDIO_TEST_FILE, O_RDWR | O_CREAT | O_TRUNC);
- TC_ASSERT_GT_CLEANUP("pcm_readi", fd, 0, clean_all_data(0, buffer));
+ TC_ASSERT_GEQ_CLEANUP("pcm_readi", fd, 0, clean_all_data(0, buffer));
bytes_per_frame = pcm_frames_to_bytes(g_pcm, 1);
frames_read = 0;
@@ -662,7 +662,7 @@ static void utc_audio_pcm_readi_n(void)
size = pcm_frames_to_bytes(g_pcm, pcm_get_buffer_size(g_pcm));
buffer = (char *)malloc(size);
- TC_ASSERT_GT_CLEANUP("pcm_readi", buffer, 0, clean_all_data(0, NULL));
+ TC_ASSERT_NEQ_CLEANUP("pcm_readi", buffer, NULL, clean_all_data(0, NULL));
ret = pcm_readi(NULL, buffer, size);
TC_ASSERT_LT_CLEANUP("pcm_readi", ret, 0, clean_all_data(0, buffer));
@@ -707,7 +707,7 @@ static void utc_audio_pcm_drop_p(void)
TC_ASSERT_NEQ_CLEANUP("pcm_drop", buffer, NULL, clean_all_data(0, NULL));
fd = open(AUDIO_TEST_FILE, O_RDWR | O_CREAT | O_TRUNC);
- TC_ASSERT_GT_CLEANUP("pcm_drop", fd, 0, clean_all_data(0, buffer));
+ TC_ASSERT_GEQ_CLEANUP("pcm_drop", fd, 0, clean_all_data(0, buffer));
bytes_per_frame = pcm_frames_to_bytes(g_pcm, 1);
frames_read = 0;
|
include: Fix typos in gpio.wrap.
BRANCH=none
TEST=none | * - ALTERNATE
* - UNUSED
*
- * @note You cannot have dependencies bewteen these macros. For example,
+ * @note You cannot have dependencies between these macros. For example,
* you cannot define GPIO_INT in terms of GPIO. All macros must be
- * independently evaluatable.
+ * independently evaluable.
* This is due to the reorganization mechanism at the bottom of this file.
*
* @see include/gpio_list.h
|
add md_zmul2 benchmark | @@ -282,6 +282,41 @@ static double bench_sumf(long scale)
}
+static double bench_zmul(long scale)
+{
+ long dimsx[DIMS] = { 256, 256, 1, 1, 90 * scale, 1, 1, 1 };
+ long dimsy[DIMS] = { 256, 256, 1, 1, 1, 1, 1, 1 };
+ long dimsz[DIMS] = { 1, 1, 1, 1, 90 * scale, 1, 1, 1 };
+
+ complex float* x = md_alloc(DIMS, dimsx, CFL_SIZE);
+ complex float* y = md_alloc(DIMS, dimsy, CFL_SIZE);
+ complex float* z = md_alloc(DIMS, dimsz, CFL_SIZE);
+
+ md_gaussian_rand(DIMS, dimsy, y);
+ md_gaussian_rand(DIMS, dimsz, z);
+
+ long strsx[DIMS];
+ long strsy[DIMS];
+ long strsz[DIMS];
+
+ md_calc_strides(DIMS, strsx, dimsx, CFL_SIZE);
+ md_calc_strides(DIMS, strsy, dimsy, CFL_SIZE);
+ md_calc_strides(DIMS, strsz, dimsz, CFL_SIZE);
+
+ double tic = timestamp();
+
+ md_zmul2(DIMS, dimsx, strsx, x, strsy, y, strsz, z);
+
+ double toc = timestamp();
+
+ md_free(x);
+ md_free(y);
+ md_free(z);
+
+ return toc - tic;
+}
+
+
static double bench_transpose(long scale)
{
long dims[DIMS] = { 2000 * scale, 2000 * scale, 1, 1, 1, 1, 1, 1 };
@@ -547,6 +582,7 @@ const struct benchmark_s {
{ bench_sum, "sum (md_zaxpy)" },
{ bench_sum2, "sum (md_zaxpy), contiguous" },
{ bench_sumf, "sum (for loop)" },
+ { bench_zmul, "complex mult. (md_zmul2)" },
{ bench_transpose, "complex transpose" },
{ bench_resize, "complex resize" },
{ bench_matrix_mult, "complex matrix multiply" },
|
Correctly check for cryptodev hash support
The sense of the check for build-time support for most hashes was inverted.
CLA: trivial | @@ -361,20 +361,20 @@ static const struct digest_data_st {
#endif
{ NID_sha1, 20, CRYPTO_SHA1 },
#ifndef OPENSSL_NO_RMD160
-# if !defined(CHECK_BSD_STYLE_MACROS) && defined(CRYPTO_RIPEMD160)
+# if !defined(CHECK_BSD_STYLE_MACROS) || defined(CRYPTO_RIPEMD160)
{ NID_ripemd160, 20, CRYPTO_RIPEMD160 },
# endif
#endif
-#if !defined(CHECK_BSD_STYLE_MACROS) && defined(CRYPTO_SHA2_224)
+#if !defined(CHECK_BSD_STYLE_MACROS) || defined(CRYPTO_SHA2_224)
{ NID_sha224, 224 / 8, CRYPTO_SHA2_224 },
#endif
-#if !defined(CHECK_BSD_STYLE_MACROS) && defined(CRYPTO_SHA2_256)
+#if !defined(CHECK_BSD_STYLE_MACROS) || defined(CRYPTO_SHA2_256)
{ NID_sha256, 256 / 8, CRYPTO_SHA2_256 },
#endif
-#if !defined(CHECK_BSD_STYLE_MACROS) && defined(CRYPTO_SHA2_384)
+#if !defined(CHECK_BSD_STYLE_MACROS) || defined(CRYPTO_SHA2_384)
{ NID_sha384, 384 / 8, CRYPTO_SHA2_384 },
#endif
-#if !defined(CHECK_BSD_STYLE_MACROS) && defined(CRYPTO_SHA2_512)
+#if !defined(CHECK_BSD_STYLE_MACROS) || defined(CRYPTO_SHA2_512)
{ NID_sha512, 512 / 8, CRYPTO_SHA2_512 },
#endif
};
|
admin/nagios: distro specific ps build requires | @@ -65,9 +65,8 @@ BuildRequires: unzip
%if 0%{?sles_version} || 0%{?suse_version}
#!BuildIgnore: brp-check-suse
BuildRequires: -post-build-checks
-%endif
-
-%ifarch aarch64
+BuildRequires: procps
+%else
BuildRequires: procps-ng
%endif
|
RTX5: minor update in configuration file (added additional comment) | // <h>RTOS Event Filter Setup
// <i> Event filter settings for RTX components.
+// <i> Only applicable if events for the respective component are generated.
// <e.7>Memory Management
// <i> Filter enable settings for Memory Management events.
|
psp2kern/kernel/intrmgr.h definitions renaming | extern "C" {
#endif
-typedef int (*intr_callback)(int code, int arg);
+typedef int (*SceKernelIntrOptParam2Callback)(int code, int arg);
-typedef struct reg_intr_opt2 {
+typedef struct SceKernelIntrOptParam2 {
uint32_t size; // 0x28
uint32_t unk_4;
uint32_t unk_8;
uint32_t unk_C;
- intr_callback *fptr0; // function pointer
- intr_callback *fptr1; // function pointer
- intr_callback *fptr2; // function pointer
+ SceKernelIntrOptParam2Callback *fptr0; // function pointer
+ SceKernelIntrOptParam2Callback *fptr1; // function pointer
+ SceKernelIntrOptParam2Callback *fptr2; // function pointer
uint32_t unk_1C;
uint32_t unk_20;
uint32_t unk_24;
-} reg_intr_opt2;
+} SceKernelIntrOptParam2;
-typedef struct reg_intr_opt {
+typedef struct SceKernelIntrOptParam {
uint32_t size; // 0x14
uint32_t num;
- reg_intr_opt2 *opt2;
+ SceKernelIntrOptParam2 *opt2;
uint32_t unk_C;
uint32_t unk_10;
-} reg_intr_opt;
+} SceKernelIntrOptParam;
-typedef int (*intr_callback_func)(int unk, void *userCtx);
+typedef int (*SceKernelIntrHandler)(int unk, void *userCtx);
int ksceKernelRegisterIntrHandler(int intr_code, const char *name, int interrupt_type,
- intr_callback_func *func, void *userCtx, int priority, int targetcpu, reg_intr_opt *opt);
+ SceKernelIntrHandler *func, void *userCtx, int priority, int targetcpu, SceKernelIntrOptParam *opt);
int ksceKernelReleaseIntrHandler(int intr_code);
|
Docs: minor update for backup with NetBackup | <body>
<section>
<p>You install and configure NetBackup client software on the Greenplum Database master host
- and all segment hosts. </p>
+ and all segment hosts. The NetBackup client software must be able to communicate with the
+ NetBackup server software.</p>
<ol id="ol_ojl_gbz_3p">
<li>Install the NetBackup client software on Greenplum Database hosts. See the NetBackup
installation documentation for information on installing NetBackup clients on UNIX
|
haboki: add gpio EC_CBI_WP
This patch assign gpio EC_CBI_WP to GPH5.
BRANCH=keeby
TEST=make BOARD=haboki | @@ -101,7 +101,7 @@ GPIO(EC_ENTERING_RW, PIN(C, 7), GPIO_OUT_LOW)
GPIO(EC_BATTERY_PRES_ODL, PIN(I, 4), GPIO_INPUT)
GPIO(EN_KB_BL, PIN(J, 3), GPIO_OUT_LOW) /* Currently unused */
GPIO(EN_PP5000_PEN, PIN(B, 5), GPIO_OUT_LOW)
-UNIMPLEMENTED(EC_CBI_WP)
+GPIO(EC_CBI_WP, PIN(H, 5), GPIO_OUT_LOW)
/* NC pins, enable internal pull-down to avoid floating state. */
GPIO(GPIOC0_NC, PIN(C, 0), GPIO_INPUT | GPIO_PULL_DOWN)
@@ -113,7 +113,6 @@ GPIO(GPIOG5_NC, PIN(G, 5), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIOG6_NC, PIN(G, 6), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIOG7_NC, PIN(G, 7), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIOH1_NC, PIN(H, 1), GPIO_INPUT | GPIO_PULL_DOWN)
-GPIO(GPIOH5_NC, PIN(H, 5), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIOJ4_NC, PIN(J, 4), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIOJ5_NC, PIN(J, 5), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIOJ6_NC, PIN(J, 6), GPIO_INPUT | GPIO_PULL_DOWN)
|
stm32/sdcard: Make SD wait routine more power efficient by using WFI.
Using WFI allows the CPU to sleep while it is waiting, reducing power
consumption. | @@ -244,11 +244,20 @@ void SDMMC2_IRQHandler(void) {
STATIC HAL_StatusTypeDef sdcard_wait_finished(SD_HandleTypeDef *sd, uint32_t timeout) {
// Wait for HAL driver to be ready (eg for DMA to finish)
uint32_t start = HAL_GetTick();
- while (sd->State == HAL_SD_STATE_BUSY) {
+ for (;;) {
+ // Do an atomic check of the state; WFI will exit even if IRQs are disabled
+ uint32_t irq_state = disable_irq();
+ if (sd->State != HAL_SD_STATE_BUSY) {
+ enable_irq(irq_state);
+ break;
+ }
+ __WFI();
+ enable_irq(irq_state);
if (HAL_GetTick() - start >= timeout) {
return HAL_TIMEOUT;
}
}
+
// Wait for SD card to complete the operation
for (;;) {
HAL_SD_CardStateTypedef state = HAL_SD_GetCardState(sd);
@@ -261,6 +270,7 @@ STATIC HAL_StatusTypeDef sdcard_wait_finished(SD_HandleTypeDef *sd, uint32_t tim
if (HAL_GetTick() - start >= timeout) {
return HAL_TIMEOUT;
}
+ __WFI();
}
return HAL_OK;
}
|
dprint: fix issues with core types
not actually sure this is correct yet, but it fixed the issue where
there would be a crash when looking for docs in an arm like +bar in
|%
++ foo 'foo'
++ bar foo | ?~ arm
:: the current topic is not an arm in the core, recurse into sut
?:(rec $(sut p.sut) ~)
- ::$(sut p.sut)
:: else, return the arm as docs
- =+ [adoc pdoc cdoc]=(all-arm-docs u.arm p.sut (trip i.topics))
+ =+ [adoc pdoc cdoc]=(all-arm-docs u.arm sut (trip i.topics))
`[%arm (trip i.topics) adoc pdoc cdoc u.arm p.sut]
:: the core name matches. check to see if there are any topics left
?~ t.topics
:: we matched the core name and have no further topics. return the core
=* compiled-against (signify p.sut)
- `[%core (trip i.topics) *what p.sut q.sut compiled-against]
+ `[%core (trip i.topics) *what sut q.sut compiled-against]
:: we matched the core name, but there are still topics left
:: check to see if one the chapters matches the next topic
=+ chapters=~(key by q.r.q.sut)
:: this should only be doing something for cores right now. you run into an
:: arm's name before you run into its docs
::
- ::?: (shallow-match i.topics q.sut)
=/ shallow-match=(unit item) $(sut q.sut, rec %.n)
?~ shallow-match
:: hint isn't wrapping a match, so step through it
=/ name=(unit term) p.p.q.sut :: should check if core is built with an arm and use that name?
=* compiled-against $(sut p.sut)
?~ name
- `[%core ~ *what p.sut q.sut compiled-against]
- `[%core (trip u.name) *what p.sut q.sut compiled-against]
+ `[%core ~ *what sut q.sut compiled-against]
+ `[%core (trip u.name) *what sut q.sut compiled-against]
::
[%face *]
?. ?=(term p.sut)
|
Updated (c) year on options.c. | @@ -278,7 +278,7 @@ cmd_help (void)
"%s `man goaccess`.\n\n"
"%s: %s\n"
- "GoAccess Copyright (C) 2009-2017 by Gerardo Orellana"
+ "GoAccess Copyright (C) 2009-2020 by Gerardo Orellana"
"\n\n"
, INFO_HELP_EXAMPLES, INFO_MORE_INFO, GO_WEBSITE
);
|
naive: update wires in aggregator | =. contract naive:local-contracts:azimuth
=. chain-id chain-id:local-contracts:azimuth
:_ this
- [%pass /azimuth %agent [our.bowl %azimuth] %watch /aggregator]~
+ [%pass /azimuth-txs %agent [our.bowl %azimuth] %watch /txs]~
::
++ on-save !>(state)
++ on-load
++ send-batch
|= [address=@t nonce=@t =sign:agent:gall]
^- (quip card _this)
+ =/ [address=@ux nonce=@ud]
+ [(slav %ux address) (rash nonce dem)]
?- -.sign
%poke-ack
?~ p.sign
=+ !<([=term =tang] q.cage.sign)
%- (slog leaf+"{(trip dap.bowl)} failed" leaf+<term> tang)
=^ cards state
- %^ on-batch-result:do
- q:(need (de:base16:mimes:html address))
- (rash nonce dem)
- %.n^'thread failed'
+ (on-batch-result:do address nonce %.n^'thread failed')
[cards this]
::
%thread-done
=+ !<(result=(each @ud @t) q.cage.sign)
=^ cards state
- %^ on-batch-result:do
- q:(need (de:base16:mimes:html address))
- (rash nonce dem)
- result
+ (on-batch-result:do address nonce result)
[cards this]
==
==
^- @ux
(hash-tx raw.raw-tx)
::
-++ hex-to-cord
- |= h=@ux
- ^- @t
- %- crip
- =- ((x-co:co (mul 2 p)) q)
- (as-octs:mimes:html h)
-::
++ part-tx-to-full
|= =part-tx
^- [octs tx:naive]
::
::TODO should go ahead and set resend timer in case thread hangs, or nah?
%+ start-thread:spider
- /send/(hex-to-cord address)/(scot %ud nonce)
+ /send/(scot %ux address)/(scot %ud nonce)
:- %aggregator-send
!> ^- rpc-send-roll
:* endpoint
:_ state
:_ ~
%+ wait:b:sys
- /resend/(hex-to-cord address)/(scot %ud nonce)
+ /resend/(scot %ux address)/(scot %ud nonce)
(add resend-time now.bowl)
:: +on-naive-diff: process l2 tx confirmations
::
|
update DISABLE_INTERRUPTS and ENABLE_INTERRUPTS functions. | @@ -17,8 +17,10 @@ to return the board's description.
#define INTERRUPT_DECLARATION()
-#define DISABLE_INTERRUPTS() __disable_irq();
-#define ENABLE_INTERRUPTS() __enable_irq();
+#define DISABLE_INTERRUPTS() __asm__( "MOVS R0, #1;" \
+ "MSR PRIMASK, R0;");
+#define ENABLE_INTERRUPTS() __asm__( "MOVS R0, #0;" \
+ "MSR PRIMASK, R0;");
//===== timer
|
Fix actual compiler warning on gcc 10.3.1 | @@ -295,7 +295,7 @@ void tu_print_mem(void const *buf, uint32_t count, uint8_t indent)
// fill up last row to 16 for printing ascii
const uint32_t remain = count%16;
- uint8_t nback = (remain ? remain : 16);
+ uint8_t nback = (uint8_t)(remain ? remain : 16);
if ( remain )
{
|
warning: trace_dump_sched_switch unused because add SCHED_INSTRUMENTATION_SWITCH
note dump: add CONFIG_SCHED_INSTRUMENTATION_SWITCH | @@ -308,6 +308,8 @@ static void trace_dump_header(FAR FILE *out,
);
}
+ #if (defined CONFIG_SCHED_INSTRUMENTATION_SWITCH) || \
+ (defined CONFIG_SCHED_INSTRUMENTATION_IRQHANDLER)
/****************************************************************************
* Name: trace_dump_sched_switch
****************************************************************************/
@@ -339,6 +341,7 @@ static void trace_dump_sched_switch(FAR FILE *out,
cctx->current_pid = cctx->next_pid;
cctx->pendingswitch = false;
}
+#endif
/****************************************************************************
* Name: trace_dump_one
|
Tweak connection ID utilities | @@ -317,6 +317,9 @@ int picoquic_compare_connection_id(const picoquic_connection_id_t * cnx_id1, con
if (cnx_id1->id_len == cnx_id2->id_len) {
ret = memcmp(cnx_id1->id, cnx_id2->id, cnx_id1->id_len);
}
+ else if (cnx_id1->id_len > cnx_id2->id_len) {
+ ret = 1;
+ }
return ret;
}
@@ -325,10 +328,18 @@ int picoquic_compare_connection_id(const picoquic_connection_id_t * cnx_id1, con
uint64_t picoquic_connection_id_hash(const picoquic_connection_id_t * cid)
{
uint64_t val64 = 0;
+ size_t i = 0;
+
+ for (; i < cid->id_len && i < 8; i++) {
+ val64 <<= 8;
+ val64 += cid->id[i];
+ }
- for (size_t i = 0; i < cid->id_len; i++) {
- val64 += val64 << 8;
+ for (; i < cid->id_len; i++) {
+ uint64_t top = val64 >> 56;
+ val64 <<= 8;
val64 += cid->id[i];
+ val64 += top * 0x10001;
}
return val64;
|
make module dir a default location for DOCS_CONFIG | @@ -18,7 +18,7 @@ def onprocess_docs(unit, *args):
else:
docs_dir = module_dir
- docs_config = os.path.normpath(unit.get('DOCSCONFIG') or os.path.join(docs_dir, 'mkdocs.yml'))
+ docs_config = os.path.normpath(unit.get('DOCSCONFIG') or 'mkdocs.yml')
if os.path.sep not in docs_config:
docs_config = os.path.join(module_dir, docs_config)
elif not docs_config.startswith(docs_dir + os.path.sep):
|
Fix chunked ccm update. | @@ -373,42 +373,49 @@ int mbedtls_ccm_update( mbedtls_ccm_context *ctx,
ctx->processed += use_len;
memcpy( ctx->b + offset, input, use_len );
- if( use_len + offset == 16 || ctx->processed == ctx->plaintext_len )
- {
if( ctx->mode == MBEDTLS_CCM_ENCRYPT || \
ctx->mode == MBEDTLS_CCM_STAR_ENCRYPT )
+ {
+ if( use_len + offset == 16 || ctx->processed == ctx->plaintext_len )
{
UPDATE_CBC_MAC;
- ret = mbedtls_ccm_crypt( ctx, 0, use_len, ctx->b, output );
+ }
+ ret = mbedtls_ccm_crypt( ctx, offset, use_len, ctx->b + offset, output );
if( ret != 0 )
return ret;
- memset( ctx->b, 0, 16 );
}
if( ctx->mode == MBEDTLS_CCM_DECRYPT || \
ctx->mode == MBEDTLS_CCM_STAR_DECRYPT )
{
- ret = mbedtls_ccm_crypt( ctx, 0, use_len, ctx->b, output );
+ ret = mbedtls_ccm_crypt( ctx, offset, use_len, ctx->b + offset, output );
if( ret != 0 )
return ret;
- memset( ctx->b, 0, 16 );
- memcpy( ctx->b, output, use_len );
- UPDATE_CBC_MAC;
- memset( ctx->b, 0, 16 );
- }
- input_len -= use_len;
- input += use_len;
- output += use_len;
+ for( i = 0; i < use_len; i++ )
+ ctx->y[i + offset] ^= output[i];
- /*
- * Increment counter.
- * No need to check for overflow thanks to the length check above.
- */
+ if( use_len + offset == 16 || ctx->processed == ctx->plaintext_len )
+ {
+ if( ( ret = mbedtls_cipher_update( &ctx->cipher_ctx, ctx->y, 16, ctx->y, &olen ) ) != 0 )
+ {
+ ctx->state |= CCM_STATE__ERROR;
+ return( ret );
+ }
+ }
+ }
+
+ if( use_len + offset == 16 || ctx->processed == ctx->plaintext_len )
+ {
for( i = 0; i < ctx->q; i++ )
if( ++(ctx->ctr)[15-i] != 0 )
break;
+ memset( ctx->b, 0, 16 );
}
+
+ input_len -= use_len;
+ input += use_len;
+ output += use_len;
}
return 0;
|
CI: switch back to manually installed Lua version
Ubuntu ships with Lua 5.3.3, even on the latest 20.04 version. The
test-suite makes some behavioral assumptions which don't hold for that
version.
This reverts commit | @@ -36,14 +36,9 @@ matrix:
cabal: 3.4
## Test system Lua
- # Test system Lua 5.3
- - env: FLAGS="+hardcode-reg-keys +pkg-config +system-lua"
+ - env: LUA=5.3.6 FLAGS="+hardcode-reg-keys +system-lua"
ghc: 8.8.4
cabal: 3.2
- addons:
- apt:
- packages:
- - liblua5.3-dev
# mark build as successful as soon as all required successes are in.
fast_finish: true
@@ -53,9 +48,27 @@ before_install:
install:
- cabal v2-build --only-dependencies --enable-tests --disable-optimization
+ - |
+ if [ -n "$LUA" ]; then
+ # Install Lua
+ wget http://www.lua.org/ftp/lua-${LUA}.tar.gz
+ tar -xf lua-${LUA}.tar.gz
+ cd lua-${LUA}
+ sed -i 's/^CFLAGS= -O2 -Wall/CFLAGS= -O2 -Wall -fPIC/' src/Makefile
+ make linux
+ make install INSTALL_TOP=${HOME}/usr
+ cd ..
+ export LD_LIBRARY_PATH=${HOME}/usr/lib:$LD_LIBRARY_PATH
+ fi
script:
- - cabal v2-configure --flags "${FLAGS}" --enable-tests --disable-optimization
+ - |
+ cabal v2-configure \
+ --flags "${FLAGS}" \
+ --enable-tests \
+ --disable-optimization \
+ --extra-include-dirs=${HOME}/usr/include \
+ --extra-lib-dirs=${HOME}/usr/lib
- cabal v2-build
- cabal v2-test
- cabal v2-sdist
|
Pass errors through to console.error | @@ -47,6 +47,7 @@ window.addEventListener("error", (error) => {
}
error.stopPropagation();
error.preventDefault();
+ console.error(error);
store.dispatch(actions.setGlobalError(error.message, error.filename, error.lineno, error.colno, error.error.stack));
return false;
});
|
Prevent overflow in getScanlineChunkOffsetTableSize | @@ -1828,12 +1828,17 @@ getScanlineChunkOffsetTableSize(const Header& header)
{
const Box2i &dataWindow = header.dataWindow();
- int linesInBuffer = numLinesInBuffer ( header.compression() );
- int lineOffsetSize = (dataWindow.max.y - dataWindow.min.y +
+ //
+ // use int64_t types to prevent overflow in lineOffsetSize for images with
+ // extremely high dataWindows
+ //
+ int64_t linesInBuffer = numLinesInBuffer ( header.compression() );
+
+ int64_t lineOffsetSize = (static_cast <int64_t>(dataWindow.max.y) - static_cast <int64_t>(dataWindow.min.y) +
linesInBuffer) / linesInBuffer;
- return lineOffsetSize;
+ return static_cast <int>(lineOffsetSize);
}
//
|
VERSION bump to version 0.12.0 | @@ -31,8 +31,8 @@ set(CMAKE_C_FLAGS_DEBUG "-g -O0")
# set version
set(LIBNETCONF2_MAJOR_VERSION 0)
-set(LIBNETCONF2_MINOR_VERSION 11)
-set(LIBNETCONF2_MICRO_VERSION 47)
+set(LIBNETCONF2_MINOR_VERSION 12)
+set(LIBNETCONF2_MICRO_VERSION 0)
set(LIBNETCONF2_VERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION}.${LIBNETCONF2_MICRO_VERSION})
set(LIBNETCONF2_SOVERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION})
|
libopae: cherry-pick fix static code scanner issues | @@ -564,7 +564,8 @@ fpga_result bmcGetLastPowerdownCause(fpga_token token, char **cause)
goto out;
}
- *cause = strdup((const char *)tmp->message);
+ *cause = strndup((const char *)tmp->message,
+ strnlen_s((const char *)tmp->message, SYSFS_PATH_MAX));
out:
if (tmp) {
@@ -598,50 +599,62 @@ fpga_result bmcGetLastResetCause(fpga_token token, char **cause)
if (tmp->completion_code != 0) {
res = FPGA_NOT_FOUND;
- *cause = strdup((const char *)"Unavailable");
+ *cause = strndup((const char *)"Unavailable",
+ strnlen_s((const char *)"Unavailable", SYSFS_PATH_MAX));
goto out;
}
if (0 == tmp->reset_cause) {
- *cause = strdup((const char *)"None");
+ *cause = strndup((const char *)"None",
+ strnlen_s((const char *)"None", SYSFS_PATH_MAX));
goto out;
}
if (tmp->reset_cause & CHIP_RESET_CAUSE_EXTRST) {
- *cause = strdup((const char *)"External reset");
+ *cause = strndup((const char *)"External reset",
+ strnlen_s((const char *)"External reset", SYSFS_PATH_MAX));
goto out;
}
if (tmp->reset_cause & CHIP_RESET_CAUSE_BOD_IO) {
- *cause = strdup((const char *)"Brown-out detected");
+ *cause = strndup((const char *)"Brown-out detected",
+ strnlen_s((const char *)"Brown-out detected", SYSFS_PATH_MAX));
goto out;
}
if (tmp->reset_cause & CHIP_RESET_CAUSE_OCD) {
- *cause = strdup((const char *)"On-chip debug system");
+ *cause = strndup((const char *)"On-chip debug system",
+ strnlen_s((const char *)"On-chip debug system", SYSFS_PATH_MAX));
goto out;
}
if (tmp->reset_cause & CHIP_RESET_CAUSE_POR) {
- *cause = strdup((const char *)"Power-on-reset");
+ *cause = strndup((const char *)"Power-on-reset",
+ strnlen_s((const char *)"Power-on-reset", SYSFS_PATH_MAX));
goto out;
}
if (tmp->reset_cause & CHIP_RESET_CAUSE_SOFT) {
- *cause = strdup((const char *)"Software reset");
+ *cause = strndup((const char *)"Software reset",
+ strnlen_s((const char *)"Software reset", SYSFS_PATH_MAX));
goto out;
}
if (tmp->reset_cause & CHIP_RESET_CAUSE_SPIKE) {
- *cause = strdup((const char *)"Spike detected");
+ *cause = strndup((const char *)"Spike detected",
+ strnlen_s((const char *)"Spike detected", SYSFS_PATH_MAX));
goto out;
}
if (tmp->reset_cause & CHIP_RESET_CAUSE_WDT) {
- *cause = strdup((const char *)"Watchdog timeout");
+ *cause = strndup((const char *)"Watchdog timeout",
+ strnlen_s((const char *)"Watchdog timeout", SYSFS_PATH_MAX));
goto out;
}
+ *cause = strndup((const char *)"Unknown",
+ strnlen_s((const char *)"Unknown", SYSFS_PATH_MAX));
+
out:
if (tmp) {
free(tmp);
|
guybrush: Enable hibernate_psl and low_power_idle
Enable CONFIG_HIBERNATE_PSL and CONFIG_LOW_POWER_IDLE.
Reorginize power configs.
TEST=Build
BRANCH=None | #undef CONFIG_EXTPOWER_DEBOUNCE_MS
#define CONFIG_EXTPOWER_DEBOUNCE_MS 200
#define CONFIG_EXTPOWER_GPIO
-#define CONFIG_POWER_COMMON
-#define CONFIG_POWER_SHUTDOWN_PAUSE_IN_S5
+#define CONFIG_HIBERNATE_PSL
+#define CONFIG_LOW_POWER_IDLE
#define CONFIG_POWER_BUTTON
-#define CONFIG_POWER_BUTTON_X86
#define CONFIG_POWER_BUTTON_TO_PCH_CUSTOM
+#define CONFIG_POWER_BUTTON_X86
+#define CONFIG_POWER_COMMON
+#define CONFIG_POWER_SHUTDOWN_PAUSE_IN_S5
#define G3_TO_PWRBTN_DELAY_MS 80
-#define SAFE_RESET_VBUS_MV 5000
-#define SAFE_RESET_VBUS_DELAY_MS 900
#define GPIO_AC_PRESENT GPIO_ACOK_OD
-#define GPIO_POWER_BUTTON_L GPIO_MECH_PWR_BTN_ODL
+#define GPIO_EN_PWR_A GPIO_EN_PWR_Z1
#define GPIO_PCH_PWRBTN_L GPIO_EC_SOC_PWR_BTN_L
#define GPIO_PCH_RSMRST_L GPIO_EC_SOC_RSMRST_L
-#define GPIO_PCH_WAKE_L GPIO_EC_SOC_WAKE_L
#define GPIO_PCH_SLP_S0_L GPIO_SLP_S3_S0I3_L
#define GPIO_PCH_SLP_S3_L GPIO_SLP_S3_L
#define GPIO_PCH_SLP_S5_L GPIO_SLP_S5_L
+#define GPIO_PCH_SYS_PWROK GPIO_EC_SOC_PWR_GOOD
+#define GPIO_PCH_WAKE_L GPIO_EC_SOC_WAKE_L
+#define GPIO_POWER_BUTTON_L GPIO_MECH_PWR_BTN_ODL
#define GPIO_S0_PGOOD GPIO_PG_PCORE_S0_R_OD
#define GPIO_S5_PGOOD GPIO_PG_PWR_S5
-#define GPIO_PCH_SYS_PWROK GPIO_EC_SOC_PWR_GOOD
#define GPIO_SYS_RESET_L GPIO_EC_SYS_RST_L
-#define GPIO_EN_PWR_A GPIO_EN_PWR_Z1
+#define SAFE_RESET_VBUS_DELAY_MS 900
+#define SAFE_RESET_VBUS_MV 5000
/*
* On power-on, H1 releases the EC from reset but then quickly asserts and
* releases the reset a second time. This means the EC sees 2 resets:
#define CONFIG_THROTTLE_AP
#define CONFIG_TEMP_SENSOR_SB_TSI
#define CONFIG_THERMISTOR
+#define CONFIG_CPU_PROCHOT_ACTIVE_LOW
#define GPIO_CPU_PROCHOT GPIO_PROCHOT_ODL
/* Flash Config */
#define GPIO_WP_L GPIO_EC_WP_L
/* Host communication */
+#define CONFIG_CMD_CHARGEN
#define CONFIG_HOSTCMD_ESPI
#define CONFIG_MKBP_EVENT
#define CONFIG_MKBP_USE_GPIO_AND_HOST_EVENT
|
Allocate the short lived header memory using a mem pool | @@ -224,10 +224,11 @@ static void on_head(h2o_socket_t *sock, const char *err)
int minor_version, http_status, rlen, is_eos;
const char *msg;
#define MAX_HEADERS 100
- h2o_header_t headers[MAX_HEADERS];
- h2o_iovec_t header_names[MAX_HEADERS];
+ h2o_header_t *headers;
+ h2o_iovec_t *header_names;
size_t msg_len, num_headers, i;
h2o_socket_cb reader;
+ h2o_mem_pool_t pool;
h2o_timeout_unlink(&client->_timeout);
@@ -236,6 +237,11 @@ static void on_head(h2o_socket_t *sock, const char *err)
return;
}
+ h2o_mem_init_pool(&pool);
+
+ headers = h2o_mem_alloc_pool(&pool, sizeof(*headers) * MAX_HEADERS);
+ header_names = h2o_mem_alloc_pool(&pool, sizeof(*header_names) * MAX_HEADERS);
+
{
struct phr_header src_headers[MAX_HEADERS];
/* parse response */
@@ -245,17 +251,17 @@ static void on_head(h2o_socket_t *sock, const char *err)
switch (rlen) {
case -1: /* error */
on_error_before_head(client, "failed to parse the response");
- return;
+ goto Exit;
case -2: /* incomplete */
h2o_timeout_link(client->super.ctx->loop, client->super.ctx->io_timeout, &client->_timeout);
- return;
+ goto Exit;
}
for (i = 0; i != num_headers; ++i) {
const h2o_token_t *token;
char *orig_name;
- orig_name = h2o_strdup(NULL, src_headers[i].name, src_headers[i].name_len).base;
+ orig_name = h2o_strdup(&pool, src_headers[i].name, src_headers[i].name_len).base;
h2o_strtolower((char *)src_headers[i].name, src_headers[i].name_len);
token = h2o_lookup_token(src_headers[i].name, src_headers[i].name_len);
if (token != NULL) {
@@ -345,8 +351,7 @@ static void on_head(h2o_socket_t *sock, const char *err)
reader(client->super.sock, 0);
Exit:
- for (i = 0; i != num_headers; ++i)
- free((void *)headers[i].orig_name);
+ h2o_mem_clear_pool(&pool);
#undef MAX_HEADERS
}
|
[build] meson: fix typo in variable name | @@ -266,7 +266,7 @@ endif
libbrotli = []
if get_option('with_brotli')
libbrotli = [ compiler.find_library('brotlienc') ]
- if compiler.has_function('BrotliEncoderCreateInstance', args: defs, dependencies: libbrotlienc, prefix: '#include <brotli/encode.h>')
+ if compiler.has_function('BrotliEncoderCreateInstance', args: defs, dependencies: libbrotli, prefix: '#include <brotli/encode.h>')
conf_data.set('HAVE_BROTLI_ENCODE_H', true)
conf_data.set('HAVE_BROTLI', true)
else
|
u3: comment use of X macro in interpreter | @@ -384,6 +384,9 @@ _n_nock_on(u3_noun bus, u3_noun fol)
// Several opcodes "overflow" (from byte to short index) to their successor, so
// order can matter here.
+// Note that we use an X macro (https://en.wikipedia.org/wiki/X_Macro) to unify
+// the opcode's enum name, string representation, and computed goto into a
+// single structure.
#define OPCODES \
/* general purpose */ \
X(HALT, "halt", &&do_halt), /* 0 */ \
@@ -502,7 +505,7 @@ _n_nock_on(u3_noun bus, u3_noun fol)
X(KITS, "kits", &&do_kits), /* 94 */ \
X(LAST, NULL, NULL), /* 95 */
-// Opcodes.
+// Opcodes. Define X to select the enum name from OPCODES.
#define X(opcode, name, indirect_jump) opcode
enum { OPCODES };
#undef X
@@ -954,6 +957,7 @@ static void _n_print_stack(u3p(u3_noun) empty) {
#endif
#ifdef VERBOSE_BYTECODE
+// Define X to select the opcode string representation from OPCODES.
# define X(opcode, name, indirect_jump) name
static c3_c* opcode_names[] = { OPCODES };
# undef X
@@ -1848,7 +1852,8 @@ static u3_noun
_n_burn(u3n_prog* pog_u, u3_noun bus, c3_ys mov, c3_ys off)
{
- // Opcode jump table.
+ // Opcode jump table. Define X to select the opcode computed goto from
+ // OPCODES.
# define X(opcode, name, indirect_jump) indirect_jump
static void* lab[] = { OPCODES };
# undef X
|
test-suite: skip 2 hypre tests | @@ -88,6 +88,7 @@ ARGS=8
}
@test "[libs/HYPRE] 2 PE Semi-Structured convection binary runs under resource manager ($rm/$LMOD_FAMILY_COMPILER/$LMOD_FAMILY_MPI)" {
+ skip
if [ ! -s ex7 ];then
flunk "ex7 binary does not exist"
fi
@@ -97,6 +98,7 @@ ARGS=8
}
@test "[libs/HYPRE] 2 PE biharmonic binary runs under resource manager ($rm/$LMOD_FAMILY_COMPILER/$LMOD_FAMILY_MPI)" {
+ skip
if [ ! -s ex9 ];then
flunk "ex9 binary does not exist"
fi
|
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.