This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Example of UBSan error from unaligned access. To run: | |
$ clang -std=c11 -fsanitize=undefined -o test-unaligned test-unaligned.c | |
$ ./test-unaligned | |
alignof(size_t) is 8 | |
unaligned address: 0x146606951 | |
test-unaligned.c:16:4: runtime error: store to misaligned address 0x00013e606951 for type 'size_t' (aka 'unsigned long'), which requires 8 byte alignment | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.25) | |
project(HelloAmongoc) | |
add_executable(hello-amongoc hello-amongoc.c) | |
find_package(amongoc REQUIRED) | |
target_link_libraries(hello-amongoc amongoc::amongoc) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Test inserting 100,000 documents with bulkWrite, w:0 write concern, and ordered:false. | |
Observe final count of 99,999 on sharded clusters. | |
To run, start a sharded cluster with: | |
mlaunch init \ | |
--replicaset \ | |
--nodes=1 \ | |
--sharded=1 \ | |
--mongos=1 \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
To build: | |
cc -o example example.c -g -I $INSTALL_PATH/include -L $INSTALL_PATH/lib -Wl,-rpath $INSTALL_PATH/lib -lcares | |
To run: | |
./example | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> // getenv | |
#include <string.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# calc_release_version_selftest.sh is used to test output of calc_release_version.py. | |
# run with: | |
# cd build | |
# ./calc_release_version_selftest.sh | |
function assert_eq () { | |
a="$1" | |
b="$2" | |
if [[ "$a" != "$b" ]]; then | |
echo "Assertion failed: $a != $b" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import yaml | |
try: | |
from yaml import CLoader as Loader | |
except ImportError: | |
from yaml import Loader | |
# Load evaluated Evergreen config. | |
# `evaluated.yml` was created by running: `evergreen evaluate ./.evergreen/config.yml > evaluated.yml` | |
with open("evaluated.yml", "r") as file: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cursor": { | |
"nextBatch": [ | |
{ | |
"_id": { | |
"_data": "826402082C000000022B042C0100296E5A1004F5EE0D4649F9441FBB3F8068DB145455463C6F7065726174696F6E54797065003C64656C6574650046646F63756D656E744B657900461E5F69640029000004" | |
}, | |
"operationType": "delete", | |
"clusterTime": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from shrub.v3.evg_build_variant import BuildVariant | |
from shrub.v3.evg_task import EvgTaskRef | |
from config_generator.etc.distros import find_large_distro | |
from config_generator.etc.distros import make_distro_str | |
from config_generator.etc.distros import to_cc | |
from config_generator.etc.utils import EvgTaskWithRunOn | |
from config_generator.etc.sasl.compile import CompileCommon | |
from config_generator.components.funcs.upload_build import UploadBuild |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PR=${PR:-} | |
REPO=${REPO:-} | |
ORG=${ORG:-mongodb} | |
if [[ "$(basename $(pwd))" != "review" ]]; then | |
echo "Must be in 'review' directory"; | |
exit 1; | |
fi | |
if [[ -z "$PR" ]]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PR=${PR:-} | |
REPO=${REPO:-} | |
ORG=${ORG:-mongodb} | |
if [[ "$(basename $(pwd))" != "review" ]]; then | |
echo "Must be in 'review' directory"; | |
exit 1; | |
fi | |
if [[ -z "$PR" ]]; then |
NewerOlder